JSON String Escaper

Escape or unescape text for JSON strings.

Escaped

"Line 1\nHe said \"hi\""

Turn text into a JSON-safe string (escaping quotes/newlines) or reverse it.

What is a JSON String Escaper?

A JSON string escaper converts text into a valid JSON string — escaping quotes, backslashes and newlines — and can reverse the process. Fontily's does both instantly in your browser, so you can safely embed text in JSON payloads and configs.

Features

  • Escape text to a JSON-safe string.
  • Unescape a JSON string back to plain text.
  • Handles quotes, backslashes and newlines.
  • Clear errors for invalid input.
  • Private and free — runs locally.

How to Use the JSON Escaper

  1. Choose Escape or Unescape.
  2. Paste your text or JSON string.
  3. The converted output appears instantly.
  4. Copy the result into your JSON or code.

Benefits

A stray quote or newline can break an entire JSON payload. An escaper guarantees valid, embeddable strings, helps developers build test data and configs, and decodes escaped values so they're readable again.

Use Cases

  • Embedding text in JSON payloads.
  • Building config and fixture files.
  • Escaping strings for code.
  • Reading escaped JSON values.

Conclusion

Fontily's JSON String Escaper makes text JSON-safe and reverses it on demand, instantly and privately. Paste your input above and copy the result — free and reliable.

Frequently asked questions

It converts characters that would break a JSON string — double quotes, backslashes, newlines and tabs — into their escaped forms (like \" and \n), and wraps the text in quotes.

Explore more tools