FertiJourney Dev Tools 🏠← All tools

HTML ↔ JS / JSX / PHP Converter

Convert HTML between document.write, JS template literals, JSX, and PHP echo — and back. Pure client-side.

Pick a direction. HTML → document.write emits document.write('…') with proper escaping of quotes, backslashes and newlines. HTML → template literal wraps the markup in backticks (and escapes ` and ${). HTML → JSX converts class → className, for → htmlFor, tabindex → tabIndex, inline style strings → style={{…}} objects, and self-closes void elements. HTML → PHP echo wraps in <?php echo '…'; ?>. The reverse direction unescapes document.write and template literals back into raw HTML. Everything runs locally in your browser.