# String escape unescape

> Escape and unescape JSON-compatible strings.

[Open tool](https://www.toolcabana.com/pl/string-escape) · [Programowanie i dane](https://www.toolcabana.com/pl/category/developer-and-data)

Tool ID: string-escape. Requested language: pl. Description language: en. Complete guide translation: no; untranslated sections use English.

## Overview (en)

String escape unescape converts text into a JSON-compatible escaped string, turning quotes, backslashes, line breaks and tabs into escape sequences. A Unicode format escapes every character as \uXXXX, using surrogate pairs where needed. Decode mode reverses JSON-style escapes and reports invalid sequences.

## Supported tasks (en)

Escape and unescape JSON-compatible strings.

## Steps (en)

1. Type or paste your source, or load an example.
2. Change the basic settings or open Advanced mode to fine-tune the result.
3. Review and copy or download your result. Pause Live results to run manually. Sources or individual settings above 20,000 characters require an explicit run.

## Settings

- Decode (en; key: decode; type: checkbox)
- Escape format (en; key: style; type: select): json [en], javascript [en], unicode [en]

## Limitations (en)

Text operations generally accept up to 2,000,000 characters. Individual parsers, generators and formulas apply additional limits shown by their controls.

## Example input

```text
Hello ToolCabana
```

## Privacy and connections (en)

This operation processes its source in your browser. Copy and download are explicit actions; source input is not saved in an account or history.

## Questions (en)

### How do I escape a string for JSON?

Paste the text with the format set to json and run the tool. Double quotes become \", backslashes become \\ and line breaks become \n, without the surrounding quotes.

### Can I convert text to \\u Unicode escapes?

Yes. Choose the unicode escape format. Every character, including plain letters, is written as a \u escape with four hex digits, and characters outside the basic plane use two escapes.

### How do I unescape a JSON string?

Turn on Decode and paste the escaped text. Sequences such as \n, \t and \u00e9 become real characters, and an invalid escape sequence returns an error.

### Where is my input processed?

This operation processes its source in your browser. Copy and download are explicit actions; source input is not saved in an account or history.

### What are the input limits?

Text operations generally accept up to 2,000,000 characters. Individual parsers, generators and formulas apply additional limits shown by their controls.

## Related tools

- [Unicode inspector](https://www.toolcabana.com/pl/unicode-inspector)
- [Random test data generator](https://www.toolcabana.com/pl/test-data)
- [User agent parser](https://www.toolcabana.com/pl/user-agent)
- [SQL INSERT generator](https://www.toolcabana.com/pl/sql-insert)
