TOOL
HTML Encode JS
Escape '</script>' occurrences in JavaScript so the code can be inlined in an HTML <script> block. Only the exact '</script>' spelling is rewritten — look-alikes such as '</script >' (with a space) pass through unescaped.
Try an example:
Local only
Recent history
No history yet
How to use
- Type or paste your input into the input box.
- Adjust any parameters if needed.
- Copy or download the result.
Frequently asked questions
- Is my data uploaded anywhere?
- No. All processing happens locally in your browser with no server round-trip.
- Does this tool work offline?
- Yes. Once the page loads, the tool runs entirely client-side and needs no network connection.
Related tools
HTML Encode Attribute
Encode text for safe use in HTML attributes. TOOL
HTML Decode JS
Decode JavaScript from HTML script embedding. TOOL
HTML Sanitize
Sanitize HTML with tag/attribute/URI whitelists (removes scripts, event handlers, unsafe URIs). TOOL
HTML Decode Attribute
Decode HTML attribute entities. TOOL
HTML Format
Pretty-print HTML with proper indentation. TOOL