HTML to XHTML converter

Source · HTML
Target · XHTML

Drop HTML files here

or choose files from your device

Choose files or drop them here (up to 16 MiB each).

Advanced options
  • In your browser
  • No upload
  • Private by design

How to convert a document online

  1. Open a converter and choose files of its source format.
  2. Review the format limits and options, then start conversion.
  3. Download the results and check their content and layout.
Browse all document conversions →

What happens when you convert HTML to XHTML?

Conversion uses Universal Text Conversion Engine (UTCE), with dedicated source readers, internal data models, transformations and target writers.

Reading the source

Semantic headings, paragraphs, lists, tables, embedded raster images and safe links enter the shared document model. Active content and external resources are not executed or fetched.

Structure and transformation

The supported source content is normalized into a shared semantic model and serialized by the target writer. Paragraphs, tables, images, links and metadata survive only where both adapters represent them; target formatting cannot recreate omitted source content.

Writing the target

Semantic content is written as namespace-qualified, well-formed XHTML with the same bounded content profile as HTML.

HTML

Source

HTML

.html / .htm

Storage: Text fileDocument model: Document tree and linked resources

Semantic headings, paragraphs, lists, tables, embedded raster images and safe links enter the shared document model. Active content and external resources are not executed or fetched.

Explore HTML format →
XHTML

Target

XHTML

.xhtml / .xht

Storage: XML documentDocument model: HTML vocabulary with XML rules

Semantic content is written as namespace-qualified, well-formed XHTML with the same bounded content profile as HTML.

Explore XHTML format →

Is HTML → XHTML right for you?

Good choice when

  • You need semantic web content with XML well-formedness and namespaces.
  • You can review the source interpretation and the target limitations before using the result.

Probably not when

  • CSS layout, scripts, forms and foreign elements are outside this semantic profile. A browser screenshot is not reconstructed.
  • You require exact source layout, every metadata field or unsupported interactive features.

HTML to XHTML conversion details

Reading the source
Semantic headings, paragraphs, lists, tables, embedded raster images and safe links enter the shared document model. Active content and external resources are not executed or fetched.
Writing the target
Semantic content is written as namespace-qualified, well-formed XHTML with the same bounded content profile as HTML.
Structure and transformation
The supported source content is normalized into a shared semantic model and serialized by the target writer. Paragraphs, tables, images, links and metadata survive only where both adapters represent them; target formatting cannot recreate omitted source content.
Technical evidence
Tested within a bounded profile. Compatibility is limited to the supported profile; review each result.
MIME
text/html → application/xhtml+xml
Adapter scope and specifications
Tim Berners-Lee — 1989 proposalWHATWG — HTML Living StandardW3C — HTML 4.01W3C — XHTML 1.0WHATWG — XML syntax

Common questions

What can be read from HTML?

Semantic headings, paragraphs, lists, tables, embedded raster images and safe links enter the shared document model. Active content and external resources are not executed or fetched. CSS layout, scripts, forms and foreign elements are outside this semantic profile. A browser screenshot is not reconstructed.

What will the XHTML output contain?

Semantic content is written as namespace-qualified, well-formed XHTML with the same bounded content profile as HTML. CSS layout, scripts, forms and foreign elements are outside this semantic profile. A browser screenshot is not reconstructed.

How does HTML structure change in XHTML?

The supported source content is normalized into a shared semantic model and serialized by the target writer. Paragraphs, tables, images, links and metadata survive only where both adapters represent them; target formatting cannot recreate omitted source content. Retain the original if exact typography, layout or complete metadata matters. Reflow is useful for reuse of supported content, but it is not archival reconstruction.

Will HTML look identical in XHTML?

CSS layout, scripts, forms and foreign elements are outside this semantic profile. A browser screenshot is not reconstructed. Retain the original if exact typography, layout or complete metadata matters. Reflow is useful for reuse of supported content, but it is not archival reconstruction. CSS layout, scripts, forms and foreign elements are outside this semantic profile. A browser screenshot is not reconstructed.

Can I convert HTML to XHTML here now?

Convert locally in your browser. Select documents of the same source format, review the options and download the results. Tested within a bounded profile. Compatibility is limited to the supported profile; review each result.