Vai al contenuto principale
CuteJSON
↑↓ Naviga Enter Seleziona Esc Chiudi

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.

Torna a tutti gli strumenti

Scorciatoie da tastiera

Funzionano dove l'azione corrispondente esiste in questa pagina.

Apri la tavolozza comandi
Ctrl/Cmd + K
Esegui l'azione principale
Ctrl/Cmd + Enter
Formatta
Ctrl/Cmd + Shift + F
Minifica
Ctrl/Cmd + Shift + M
Copia output
Ctrl/Cmd + Shift + C
Apri file
Ctrl/Cmd + Shift + O
Scarica output
Ctrl/Cmd + S
Chiudi questa finestra
Esc
Apri questa finestra
F1 / ?

Dati locali

Tutto qui sotto e memorizzato solo in questo browser.

Bozze non salvate
Strumenti con opzioni ricordate

File aperti di recente

    Nessun file aperto ancora.

    Condividi via link

    Il contenuto e impacchettato nella parte dopo il #.

    Condivide la prima input in questa pagina.

    Niente da condividere ancora.

    Text

    Carica da un URL

    Recupera l'URL dal tuo browser.

    Escaped

    Il risultato appare qui.

    Funziona interamente nel tuo browser.

    Su questo strumento

    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.

    Come usare

    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.