CSS Escape Converter
Escape non-ASCII text for CSS in your browser. Characters become hex escapes with the required trailing space, ready for content and selectors.
What this css escape converter does
A CSS escape is a backslash, up to six hex digits for the code point, and a trailing space when the next character could be read as part of the number. Non-ASCII characters and backslashes are escaped; ordinary ASCII is left readable.
How to use it
CSS Escape Converter: paste the text into the box above, and press Run to get the CSS escapes below.
Worked example
Input:
你好
Output:
\4f60 \597d
Why it runs in your browser
The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads text and returns CSS escapes; reloading the page discards both.
A CSS escape is a backslash, up to six hex digits for the code point, and a trailing space when the next character could be read as part of the number. Non-ASCII characters and backslashes are escaped; ordinary ASCII is left readable.
Escape non-ASCII text for CSS in your browser. Characters become hex escapes with the required trailing space, ready for content and selectors.
How to use it
CSS Escape Converter: paste the text into the box above, and press Run to get the CSS escapes below.
Why it runs in your browser
The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads text and returns CSS escapes; reloading the page discards both.
What to Expect
Best for
- Converting text to CSS escapes when the data is already on screen.
What this tool keeps
- Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere.
Sample input
你好
Sample output
\4f60 \597d
Frequently asked questions
How do I use the css escape converter?
CSS Escape Converter: paste the text into the box above, and press Run to get the CSS escapes below.
Is my input uploaded?
No. The text is parsed on this page with JavaScript and is never posted to a server.
Is there a size limit?
Yes: 5 MB per run. Larger input is refused with a message rather than freezing the tab.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.