Tools
Pre/Code Converter
Escape raw code to a safe
<pre><code>
block (and back), add language classes, and copy instantly.
Input
Paste raw code or HTML here. Choose a language class and options below.
Language class (for syntax highlighters)
Optional title/caption
Trim whitespace
Tabs → spaces
Escape quotes
Wrap in figure/code block
2 spaces
4 spaces
8 spaces
Convert to <pre><code>
Unescape to raw
Copy output
Download .html
Clear
Output
Generated HTML you can paste into docs, blogs, CMS, or templates.
Preview
Live render of your converted block.