HTMLtoApphtmltoapp.net Build free
free utility · runs in your browser

Absolute path fixer

Root-relative paths are the number-one cause of blank HTML apps. Paste a page, say where it sits in your site, and get it back with every local link made relative.

e.g. index.html, blog/post.html, css/style.css

Full URLs on this domain are made relative too.

Why root-relative paths break in an app

On a web server, /css/style.css means "from the top of this site". Inside an APK built from HTML, your site lives at https://appassets.androidplatform.net/web/. The top of that origin is outside your files, so /css/style.css is not found and the page renders blank or unstyled. A relative path — css/style.css from the root, ../css/style.css from a sub-folder — works everywhere: on your server, on your disk and in the app.

What gets rewritten

  • src, href, poster, data-src, action and every candidate in srcset.
  • CSS url(), in <style> blocks, inline styles or a pasted stylesheet.
  • http://localhost:…, 127.0.0.1 and LAN-IP URLs left over from a dev server.
  • Full URLs on your own domain, if you enter it.

Protocol-relative (//cdn…) and other external URLs are left alone. Paths built at runtime in JavaScript cannot be seen here; for bundled apps, fix them at the build step — base: './' in Vite, "homepage": "." in Create React App.

Questions people ask

Do I need relative paths for a URL-based app?

No. A URL app loads your live site from its real server, where root-relative paths are fine. Only bundled HTML and ZIP apps need them.

What should a page in a sub-folder use?

Paths that climb out of its folder: from blog/post.html, the stylesheet at css/style.css is ../css/style.css. Enter the file's location and the fixer works it out.

Your HTML is one upload away from an app

Install the free builder, drop in your HTML file or ZIP, and download a signed APK in a few minutes. No watermark, no card, no Android Studio.

Build my APK free