Skip to main content
CuteJSON
↑↓ Navigate Enter Select Esc Close

JSON Escape and Unescape

Turn a JSON document into a string you can paste inside another document, or read an escaped string back into the text it stands for.

Back to all tools

Keyboard shortcuts

These work wherever the matching action exists on this page.

Open the command palette
Ctrl/Cmd + K
Run the main action
Ctrl/Cmd + Enter
Format
Ctrl/Cmd + Shift + F
Minify
Ctrl/Cmd + Shift + M
Copy output
Ctrl/Cmd + Shift + C
Open file
Ctrl/Cmd + Shift + O
Download output
Ctrl/Cmd + S
Close this dialog
Esc
Open this dialog
F1 / ?

Local data

Everything below is stored only in this browser, on this device. None of it is ever sent anywhere, and closing this dialog is not required for that to stay true.

Unsaved drafts
Tools with remembered options

Recently opened files

    No files opened yet on this device.

    Share via link

    The content is packed into the part of the link after the # sign, which browsers never send to a server. Nothing here is uploaded to cutejson.com or anywhere else.

    Shares the first input on this page. On a tool with more than one, only that one is included.

    Nothing to share yet. Paste or type something first.

    Text

    Load from a URL

    Fetches the URL directly from your browser and loads whatever text it returns into this pane.

    Escaped

    The result appears here.

    Runs entirely in your browser. Nothing you paste is uploaded, and you can confirm that in your browser Network tab.

    About this tool

    Escaping is what a document needs before it can live inside a string: a JSON value holding another JSON document, a log line, a shell argument, a fixture pasted into a test. The rules are short and all of them are here. The characters with a short escape get it, control characters that have no short form become a \u escape, and a forward slash is left alone, because JSON accepts \/ and nothing requires it. Optionally everything above ASCII becomes a \u escape as well, which is what you want when the text has to cross something that is not certainly UTF-8. Neither direction requires valid JSON, since escaping part of a document is an ordinary thing to want, and the page says separately whether the result happens to parse.

    How to use

    1. Choose Escape or Unescape, then paste your text into the left pane.
    2. When escaping, decide whether to wrap the result in quotes and whether to escape everything above ASCII.
    3. Press Convert, then copy the result. A bad escape is reported with the line and column it sits on.

    Keep reading

    How to escape and unescape JSON strings correctly Read the guide