Inline CSS and JavaScript

Embed external CSS and JavaScript resources into HTML to create a portable single-file webpage.

Inline Assets

HTML CSS and JavaScript asset inliner

This asset inliner reads external stylesheet links, script src values, and image src values. CSS becomes style content, JavaScript becomes inline script content, and images become Data URLs, producing a portable HTML file for saving, sharing, or offline use. Browser XHR is used, so cross-origin servers must allow CORS.

Portable single file

Package pages with modest dependencies into one HTML file for archiving, sharing, and offline opening.

Choose asset types

Enable CSS, JavaScript, and images independently to avoid reading or expanding resources you do not need.

Track failed assets

Assets are read sequentially. CORS, 404, or network errors do not block the remaining assets and are reported.

How to use

  1. Paste HTML with external link, script, or img elements and provide a base URL for resolving relative paths.
  2. Select asset types, click Inline assets, and wait for sequential processing to finish.
  3. Review the output and copy or download it. Move failed cross-origin assets to the same origin or enable CORS before retrying.

FAQ

Why did an asset fail?

The browser requires the target server to allow reading through CORS. 404 responses, protocol mismatches, bad relative paths, and login-protected resources can also fail. Check the URL and response headers before retrying.

Will inlined JavaScript execute?

During conversion the script text is written to the parsed DOM and is not executed in the tool UI. A downloaded HTML file may execute scripts when opened, so process trusted sources only.

Recommended utilities

You may also need these file utilities