Pang-escape ng JSON string
I-escape ang plain text bilang valid na JSON string, kasama ang quote, newline at backslash.
Input
Tip: pindutin ang Ctrl + Enter para patakbuhin
Mga naka-save na settings
Sa ngayon, nasa Ingles lamang ang detalyadong tulong sa ibaba.
Tungkol sa tool na ito
Putting a paragraph, an HTML snippet or a Windows file path inside JSON breaks the JSON if quotes, backslashes or line breaks are not escaped. This tool wraps your text in double quotes and escapes everything JSON requires, giving a string literal you can paste straight into a configuration file, an API request body or a test fixture.
Paano ito gamitin
- Paste the raw text, including any line breaks.
- Run the escaper.
- Copy the result, including its surrounding double quotes.
- Paste it as a value in your JSON, after a key and colon.
Paano gumagana ang kalkulasyon
The text is passed to JSON.stringify, which escapes ", \, control characters, line feeds (\n), carriage returns (\r) and tabs (\t), and wraps the result in double quotes.
JSON.stringify(text)Halimbawa
A support message reads She said "hi", then a new line, then "then left \ back". Escaping it produces "She said \"hi\"\n…", where the inner quotes became \" and the backslash became \\, so the value can sit inside a JSON object without breaking it.
Halimbawang input at resulta
Kumusta → "Kumusta"
Mga limitasyon
- Produces a single string literal, not a full JSON document.
- Does not unescape.
- Up to 100,000 characters.
Huling na-update:
Mga madalas itanong
Do I need to escape non-English characters?
No. JSON allows UTF-8 text directly; only quotes, backslashes and control characters must be escaped.
How do I unescape a JSON string?
Paste the full JSON into the JSON formatter, or parse it in your code.
Why are there quotes around the output?
A JSON string literal includes its quotes. Remove them only if your template adds its own.
Pag-aayos ng problema
Backslashes doubled again when I re-ran it.
You escaped already-escaped text. Start from the original raw text.
The JSON still breaks.
Check that you pasted the whole result including both outer quotes.
Line breaks show as \n in my app.
That is the escaped form in JSON; parsing the JSON turns them back into real line breaks.
Privacy & Libreng gamitin
Sine-save ba ang aking input?
Nananatili sa tab na ito ang iyong input. Hindi namin natatanggap ang iyong mga file, na-paste na teksto o value ng kalkulasyon.
Libre ba ang tool na ito?
Oo. Walang kailangang signup o bayad.
Tingnan din
Mga susunod na hakbang
JSON formatter at validator
I-validate, i-pretty-print o i-minify ang JSON sa iyong device. Hindi kailanman ipinapadala sa server ang invalid na data.
Developer at SEOConverter ng CSV papuntang JSON
I-convert ang CSV header at record sa JSON, kasama ang delimiter na nasa quote at line break.
Developer at SEOConverter ng JSON papuntang CSV
I-convert ang flat na array ng object sa CSV. Nilalagyan ng proteksiyong prefix ang mga string na mukhang formula para sa spreadsheet.
Developer at SEO