HTML to elements import
Paste HTML and CSS and convert them into native Divhunt elements, classes and breakpoint styles.
The HTML to JSON tool takes HTML and optional CSS and converts it into Divhunt elements with classes and styles, so code from elsewhere becomes editable in the Designer.
How it works
- Popup with HTML and CSS textareas and a Convert & Add button; also available as an element in the Embed group.
- Skipped tags: br, hr, wbr, meta, link, script, style, noscript, template.
- Mapped tags: strong to b; em, i, u, sub, sup, abbr, legend, output to span; main, dl, dt, dd, table parts, picture, dialog, details, fieldset, datalist, progress, meter to div; svg to embed.
- CSS rules become classes; media queries snap to the closest existing breakpoint (default 1920).
- @keyframes are kept by adding an embed with a style tag.
When to use it
- Bring a section from a static HTML template
- Convert a snippet from a UI library
Limitations
- Tables and other unsupported tags lose their semantics (become div)
- Scripts are dropped
Availability
- Works in Designer.
- Included in every plan.
How to use it.
- Select a parent element
- Add the HTML to JSON element or open the tool
- Paste HTML and CSS
- Click Convert & Add
Questions.
Are my CSS classes kept?
Related features.
All available HTML tags support
Build with real HTML elements: sections, headings, lists, media, forms and semantic tags like article, nav and aside.
Custom breakpoints
Use the four default breakpoints or add your own pixel breakpoints, with a live width slider for each.
Native class system
Create reusable CSS classes, combine several on one element, and edit them visually across breakpoints and states.
Browse other features
Designer
Bring your ideas to life with our visual website builder. Drag and drop with ease, or dive into coding when needed.
→AI Studio
Describe it and AI builds it. Every change lands in the same project you can open in the Designer.
→MCP
Connect Claude Code, Cursor or any MCP client and build whole sites with your own agent.
→CMS
Create, organize, and manage your dynamic content with the maximum freedom and flexibility of our visual CMS.
→SEO
Divhunt delivers ultra-fast & structured sites that are good for ranking by default, while offering complete control for customization.
→REST API
Easily link to any REST API endpoint with instant preview and expand your site’s functionality smoother than ever before.
→Plugins
Divhunt offers an open platform for creating plugins to upgrade features, add new capabilities, and simplify building better sites.
→Localization
Localize everything from static pages and CMS content to URLs and metadata, in up to 15 languages with no add-on.
→Interactions
Visually create animations and interactions with a simple, intuitive timeline. Build smooth, engaging experiences without code.
→Custom Files
Manage JS and CSS files with a structure developers love, combining folders and clean organization.
→Memberships
Create plans, decide who sees what and connect it all to your CMS. Build courses, communities or client portals.
→