Upload guide

Zip your app with index.html at the top

html2app takes one .zip file per upload. The zip must contain an index.html file, and its files must be ready to publish. html2app does not build your project, so zip the output of your build, not the raw project.

Only .zip files are accepted. Other archive formats and loose files are rejected.

my-app.zipwhat html2app expects
my-app.zip
├── index.html        ← required, exact name
├── css/
│   └── style.css
├── js/
│   └── app.js
└── images/
    └── logo.png

01 The rules

Three rules for every upload

One .zip file

Upload a single .zip file. html2app rejects .rar, .7z and .tar.gz files, and it rejects loose files such as a lone index.html.

index.html, spelled exactly

The zip must contain a file named index.html in lowercase. Index.html, INDEX.HTML and index.htm are not accepted.

Ready-to-publish files

html2app does not run npm, a bundler, a compiler or a transpiler. Upload files that a browser can load right away.

02 Layout

Where index.html has to sit

html2app accepts three layouts. Use the root layout unless your project already uses one of the other two.

Layout What the zip contains Notes
Root (recommended) index.html at the top level, with css/, js/ and images/ folders beside it Works for every project.
Single folder One folder at the top level that directly contains index.html, such as my-app/index.html The folder name may use only English letters, numbers, hyphens and underscores.
Cordova www/index.html at the top level For projects that already keep their files in www/.

Not accepted: index.html two or more folder levels deep, such as my-app/dist/index.html. Also not accepted: several folders at the top level, such as src/ and dist/, when index.html is not at the top level.

Use relative links such as css/style.css, not /css/style.css. Relative links keep working wherever the app loads.

03 Ready-to-publish files

Upload the output of your build, not the project

html2app stores the zip, checks its structure and packages your files into a native app. The pipeline does not transpile, compile or otherwise modify your files. Each file you upload is the file that gets published.

Upload

  • HTML, CSS and JavaScript that the browser runs as they are
  • Images, fonts, audio, video and JSON files that the app loads
  • The output folder of your build tool, such as dist/ or build/

Do not upload

  • The raw project folder, with package.json, node_modules/ and source folders
  • TypeScript, JSX, Vue or Sass files that the browser cannot read, such as .ts, .tsx, .jsx, .vue and .scss
  • Anything that still needs npm run build or a similar command before the browser can use it

If your project needs a build

Run the build first. It writes the browser-ready files to an output folder, often dist/ or build/. Zip the contents of that folder.

The structure check does not run your app. Before you zip, serve the output folder with a local web server, for example python3 -m http.server run inside that folder. Open http://localhost:8000 in a browser and confirm that every page and file loads.

04 Create the ZIP

Zip the files inside the output folder

Select the files inside the folder, not the folder itself. This puts index.html at the top level of the zip.

Windows

  1. Open the output folder, such as dist, and select everything inside it with Ctrl+A.
  2. Right-click the selection, choose Send to, then Compressed (zipped) folder.
  3. Rename the new .zip file to my-app.zip.

macOS

  1. Open the output folder and select everything inside it with Command+A.
  2. Right-click the selection and choose Compress, followed by the number of items.
  3. Rename Archive.zip to my-app.zip.

Terminal (macOS or Linux)

run inside the project folder
cd dist
zip -r ../my-app.zip .

The dot at the end zips the contents of dist/, so index.html lands at the top level. Replace dist with the name of your output folder.

Zipping the output folder itself also works when that folder directly contains index.html. The zip then has one folder level, such as dist/index.html, which matches the single folder layout. The root layout is simpler.

05 Check and upload

Check the zip, then upload it

Before you upload

  • The file name ends in .zip.
  • Opening the zip shows index.html at the top level, or in the one folder layout you chose.
  • The file is named index.html in lowercase.
  • File names are 200 characters or fewer, and 240 bytes or fewer when encoded as UTF-8.
  • File and folder names use English letters, numbers, hyphens and underscores. Other characters need a zip that stores names as UTF-8.
  • The zip fits your plan's upload limit: 10 MB on Free, 50 MB on Starter, 200 MB on Developer and 500 MB on Pro. The server also rejects zips with more than 10,000 files or more than 500 MB of content when unpacked.

Upload the zip

  1. Open your project on app.html2app.dev.
  2. In the upload area, drop the zip or select it. Upload one zip per build.
  3. html2app checks the zip in your browser before the upload starts.
  4. The server checks the zip again after the upload. If the server rejects it, the build is marked failed with a reason.

html2app ignores junk files such as __MACOSX, .DS_Store, Thumbs.db and desktop.ini, so you do not need to remove them.

06 Errors

Fix a rejected zip

Find the message that html2app shows, then apply the fix in the same row.

What html2app says Cause Fix
The selected file does not end in .zip. The file is another archive format, or a loose file. Create a .zip file and select it.
Your ZIP must contain an index.html file at the root level, inside a www/ folder, or inside a single folder. No index.html is in an accepted place. Put index.html at the top level, or use one of the layouts in section 02.
The ZIP contains index.html, but not at the root level, inside a www/ folder, or directly inside a single folder. index.html is nested deeper, for example my-app/dist/index.html. Zip the folder that directly contains index.html.
The name must be exactly index.html in lowercase. The file is named Index.html, INDEX.HTML or index.htm. Rename the file to index.html, then zip again.
Your ZIP contains multiple folders at the root level. Several folders sit at the top level, and index.html is not at the top level. Move index.html to the top level, or keep only the output folder. Remove source folders such as src/.
The folder containing your index.html file must use only English letters, numbers, hyphens, and underscores. The single folder name has spaces, accents or other characters. Rename the folder, then zip again.
One or more file names in your ZIP are too long. A file name has more than 200 characters, or more than 240 bytes in UTF-8. Emoji and accented letters use more bytes. Shorten the file names.
One or more file names contain non-English characters, but the ZIP does not store them as UTF-8. The zip was created without UTF-8 file names. Create the zip with UTF-8 file names, or rename the files to English letters.
The ZIP archive is damaged or incomplete. The download or copy was cut short, or the zip is corrupted. Create the zip again.
The browser could not read this file. The file moved or changed after you selected it, or it is a cloud placeholder that is not downloaded yet. Make sure the file is fully downloaded to this computer, then select it again.
The ZIP file is empty or contains no valid files. The zip holds no files, or only junk files such as __MACOSX. Zip the output folder with its files inside.

07 FAQ

Common questions

Can I upload a folder instead of a zip?

No. Zip the folder first. The upload accepts .zip files only.

Can I upload a .rar or .7z file?

No. Create a .zip file.

Does html2app run npm run build for me?

No. Run the build on your computer, then zip the output folder.

Can index.html sit inside a subfolder?

Only in one of the two folder layouts: a single folder that directly contains index.html, or www/. Other positions are rejected.

Does a passing check mean the app works?

No. The check looks at the zip structure and file names. It does not run the app, so test it in a browser before you upload.

Are my files changed after upload?

No. The pipeline does not transpile, compile or otherwise modify your files.