Compressed HTML for AI code generation. Fewer tokens, same output.
BHTML is the HTML module of BurnedLang — an experimental family of compressed symbolic languages designed for AI-assisted code generation.
Instead of writing verbose HTML tags repeatedly, an AI generates compact Unicode opcodes. A converter then expands them back into valid, standard HTML.
▢ → <div class="container">
♥ → <header>
★☆✦☀☁⌂My Site⌃✧✩ → Full HTML boilerplate
BurnedLang is not a new programming language. It is a symbolic compression layer — a shorthand that LLMs can generate efficiently, designed to be expanded deterministically back into normal code.
LLMs operate within token budgets. Traditional HTML is token-heavy:
<divclass="container"><header><nav><ul><li><ahref="index.html">Home</a></li>Every repeated tag, attribute, and boilerplate fragment costs tokens. Over a large codebase, this adds up fast.
BHTML replaces the most frequent HTML patterns with single Unicode characters:
▢
♥
♝
→
↦△§index.html">Home▷↤
The AI generates far fewer tokens. The converter does the rest.
Human prompt
↓
AI generates BHTML (compact Unicode opcodes)
↓
bhtml.converter.py (string replacement, longest-first)
↓
Valid HTML output
Reverse mode is also supported — compress existing HTML into BHTML:
index.html → converter (--reverse) → index.bhtml
python bhtml.converter.py input.bhtml output.htmlpython bhtml.converter.py input.html output.bhtml --reverse- Python 3.7+
- No external dependencies
The dictionary file (bhtml.dictionary.json) must be in the same directory as the converter.
BHTML uses Unicode symbols as atomic opcodes. Each opcode maps to exactly one HTML fragment.
| Opcode | Expands to |
|---|---|
★ | <!DOCTYPE html> |
☆ | <html lang="en"> |
✪ | </html> |
✦ | <head> |
✧ | </head> |
✩ | <body> |
✫ | </body> |
⌂ | <title> |
⌃ | </title> |
| Opcode | Expands to |
|---|---|
☀ | <meta charset="UTF-8"> |
☁ | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
☂ | <meta name="description" content=""> |
✭ | <link rel="stylesheet" href="style.css"> |
✯ | <script src="script.js"></script> |
| Opcode | Expands to |
|---|---|
□ | <div> |
■ | </div> |
▢ | <div class="container"> |
▣ | <div class="card"> |
▤ | <div class="row"> |
▥ | <div class="col"> |
▦ | <div class="grid"> |
▧ | <div class="wrapper"> |
▨ | <div class="content"> |
▩ | <div class="sidebar"> |
▪ | <div class="hero"> |
▫ | <div class="footer"> |
| Opcode | Expands to |
|---|---|
♠ | <section> |
♣ | <article> |
♥ | <header> |
♦ | <footer> |
♜ | <main> |
♝ | <nav> |
| Opcode | Expands to |
|---|---|
◆ | <form action="" method="post"> |
◌ | <input type="text"> |
◍ | <input type="password"> |
◐ | <input type="email"> |
◈ | <button type="submit"> |
⌗ | <textarea> |
⌜ | <select> |
| Opcode | Expands to |
|---|---|
¤ | class=" |
¢ | id=" |
§ | href=" |
µ | src=" |
¶ | alt=" |
¬ | placeholder=" |
Ë | onclick=" |
| Opcode | Expands to |
|---|---|
Û | required |
Ü | disabled |
Ý | readonly |
à | checked |
Full opcode list: see
bhtml.dictionary.json— 130+ mappings total.
★
☆
✦
☀
☁
⌂My Page⌃
✭
✧
✩
▢
♥
<h1>Hello World</h1>
♡
♜
<p>Welcome to my site.</p>
♞
■
✫
✪
<!DOCTYPE html><htmllang="en"><head><metacharset="UTF-8"><metaname="viewport" content="width=device-width, initial-scale=1.0"><title>My Page</title><linkrel="stylesheet" href="style.css"></head><body><divclass="container"><header><h1>Hello World</h1></header><main><p>Welcome to my site.</p></main></div></body></html>BHTML is built on a strict, simple model:
- String replacement only — the converter is not an HTML parser
- Longest match first — prevents partial replacements
- One opcode = one fragment — atomic, never merged
- Fully reversible — every
.bhtmlfile can be expanded back to valid HTML - JSON-driven — all mappings live in
bhtml.dictionary.json, nothing is hardcoded - No runtime — no interpreter, no compiler, no VM
Attribute opcodes replace the attribute name inside an HTML tag, not the tag itself.
✅ <div ¤card"> → <div class="card">
❌ □¤card" → <div>class="card" (broken!)
Pre-built layout opcodes (▣, ▢, etc.) already include their class — never append attributes to them.
BHTML/
├── bhtml.converter.py # CLI converter (BHTML ↔ HTML)
├── bhtml.dictionary.json # All opcode mappings
├── bhtml.skill.md # AI prompt skill (for LLM integration)
├── output.html # Example output file
└── README.md
BHTML is the first released module. Planned modules:
| Module | Target | Status |
|---|---|---|
| BHTML | HTML | ✅ Released |
| BCSS | CSS | 🔧 Planned |
| BJS | JavaScript | 🔧 Planned |
| BPY | Python | 🔧 Planned |
| BSQL | SQL | 💡 Concept |
| BJSON | JSON | 💡 Concept |
| BYAML | YAML | 💡 Concept |
- AI code generation with reduced token usage
- Prompt compression for large HTML codebases
- AI coding assistants generating boilerplate faster
- Tokenizer and compression research
- Educational experiments in symbolic language design
- BHTML is not meant for hand-editing in production
- Generated files should be expanded before manual maintenance
- The converter performs text replacement — it does not validate HTML structure
- Some complex custom attributes still require manual HTML syntax
BurnedLang is an experimental research project exploring symbolic source-code compression for AI systems.
It is not intended to replace HTML or any existing web standard. Its purpose is to reduce repetitive syntax overhead during AI-assisted code generation, while remaining fully reversible through deterministic converters.
Made with 🔥 by BnBurned