Convika

הדף עדיין לא זמין בעברית, ולכן הוא מוצג באנגלית.

How to view an HTML file on GitHub as a web page, not code

Quick answer

GitHub shows an .html file in a repository as code, and its Raw button serves the file as plain text, so the browser shows the code there too. To see the page run, download the raw file and open it in your browser, publish the repository with GitHub Pages (public repositories on GitHub Free), or upload the file to an HTML host for a link anyone can open.

Get a link for my HTML file

Free plan: no credit card, 1 published page.

On this page

You opened an .html file in a GitHub repository, maybe a page Claude Code or Codex committed, a classmate's project, or an example from a tutorial, and GitHub showed you its code. That's how GitHub shows HTML: it renders Markdown, CSV tables, PDFs, images, and notebooks, and HTML isn't on that list. This guide gives the ways to see the page itself, from GitHub's documentation and our check of GitHub's file server, both on November 20, 2026.

The quickest is the upload box at the top of this page: download the file from GitHub, drop it in, and you get a preview link without an account. That preview runs no scripts. Click Keep this page — free, no card and sign up, and the page moves into your account, where its scripts run and you can publish it at a link.

Why GitHub shows the code

GitHub's documentation lists the non-code files it renders: images (PNG, JPG, GIF, PSD, and SVG), 3D .stl files, CSV and TSV tables, PDFs, prose documents such as Markdown, GeoJSON maps, and Jupyter notebooks. An .html file shows as code, with line numbers.

The Raw button doesn't run it either. GitHub's documentation says the raw view lets you "view or copy the raw content of a file without any styling." On November 20, 2026, we asked GitHub's file server for an HTML file's raw address. It answered with:

HeaderValueWhat it does
content-typetext/plain; charset=utf-8The browser shows the file as text
x-content-type-optionsnosniffThe browser doesn't guess that it's HTML
content-security-policydefault-src 'none'; style-src 'unsafe-inline'; sandboxNothing on the page loads or runs

So every browser shows the code at a raw address. To see the page, it needs to come from a place that serves it as a web page: your own computer, GitHub Pages, or an HTML host.

Download the file and open it

  1. On GitHub, click the file.
  2. In the upper-right corner of the file view, click the download icon beside Raw: GitHub's documentation says it downloads the raw file.
  3. Open the downloaded file in Chrome, Edge, Safari, or Firefox: double-click it, or press Ctrl + O (Cmd + O on a Mac) in the browser.

For a whole project, click Code above the list of files, then Download ZIP, unzip it, and open the .html file from its folder, so the CSS, scripts, and images beside it load too. A page that fetches data files or uses module scripts needs a local server: How to open an HTML file has the steps for each device and browser.

On an iPhone, a downloaded file opens as a Quick Look preview, which ran no JavaScript in our iPhone test. Open it in the free HTML viewer instead: tap Choose an .html file, and the page runs in your browser. The file isn't uploaded.

Turn on GitHub Pages

GitHub Pages is GitHub's own way to serve the files as a website. GitHub describes it as "a static site hosting service that takes HTML, CSS, and JavaScript files straight from a repository on GitHub".

  1. On GitHub, go to the repository, and under its name, click Settings.
  2. In the "Code, planning, and automation" section of the sidebar, click Pages.
  3. Under "Build and deployment", under "Source", select Deploy from a branch.
  4. Choose the branch, and a folder if you want one, then click Save.
  5. Back on that settings page, under "GitHub Pages", click Visit site.

What GitHub's documentation says about it:

  • Which repositories. "GitHub Pages is available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server."
  • Who sees it. "GitHub Pages sites are publicly available on the internet, even if the repository for the site is private".
  • The address. A project's site is at <owner>.github.io/<repositoryname>, and its entry file is "an index.html, index.md, or README.md file". Another file is at its own path, such as /<repositoryname>/quiz.html.
  • How long. "It can take up to 10 minutes for changes to your site to publish after you push the changes to GitHub."
  • What for. GitHub Pages "is not intended for or allowed to be used as a free web-hosting service to run your online business, e-commerce site, or any other website that is primarily directed at either facilitating commercial transactions or providing commercial software as a service (SaaS)."

GitHub Pages limits and GitHub Pages with a private repository go further.

Ways to see an HTML file from GitHub, compared

WayThe page runsWho can open itWhat it takes
The file view on GitHubNo, it shows codeAnyone who can see the repositoryNothing
RawNo, plain textAnyone who can see the repositoryNothing
Download and openYes, on your computerOnly youA browser; a local server for module scripts and data files
HTML viewerYes, in your browserOnly youThe downloaded file
GitHub PagesYesEveryone on the internetRepository settings; a public repository on GitHub Free
A link from an HTML hostYesEveryone with the linkOne upload, no repository settings

Convika serves one .html or .htm file up to 2 MB, or pasted code, at a lasting link, with its HTML, CSS, and JavaScript as they are. It works for a file from a private repository, too, and needs no repository settings.

Download the file from GitHub, drop it into the upload box at the top of this page, or paste the code from the file view, and click Get my preview link. You get a link in seconds, without an account. It works for 3 minutes, with scripts and forms off, so it's for checking the layout. If the page's CSS and images sit in a folder next to it, drop that folder, or a zip of it, and the box puts them inside the file.

2. Keep the page

Click Keep this page — free, no card and sign up. The page moves into your account, and its scripts run in the dashboard preview.

3. Publish it

Click Publish page. Under Who can open this page?, choose Public and click Next. The first time, click Publish free: the page goes live with a small Convika bar at the bottom. Under it, a second button buys the Pro pass ($5 once for 30 days, no auto-renewal) and publishes the page without the Convika bar. On Free, the page is Public: anyone with the link can open it, and it may show up in search results and in Convika's gallery. For a file from a private repository, choose Private link or Only people with the password (Pro) instead.

Copy the page's address, such as yourpage.convika.page, and put it in the repository's README, an issue, or a chat. It opens as a web page in any browser. Free includes 1 published page and 10,000 page views a month, and the dashboard shows how many people opened it.

Skipbox

Cheap & fast GitHub Actions runners, unlimited for $39 a month

Your own machine keeps Docker layers and package caches between jobs. Switch by changing one runs-on line.

Start a free Skipbox trial⁠

Frequently asked questions

How do I view an HTML file in GitHub?

GitHub shows an .html file as code, and its Raw button shows it as plain text. To see the page, download the raw file with the icon beside Raw and open it in your browser, turn on GitHub Pages for the repository, or upload the file to an HTML host and open its link.

How do I preview an HTML file in GitHub without downloading it?

Turn on GitHub Pages: in the repository's Settings, click Pages, choose Deploy from a branch, pick the branch, and click Save. The page is then at <owner>.github.io/<repositoryname>/ and the file's path, within about 10 minutes, GitHub says. On GitHub Free, the repository has to be public.

Why does GitHub show my HTML code instead of the page?

GitHub renders Markdown, CSV, PDFs, images, notebooks, and a few other formats, and HTML isn't one of them. Its raw address is served as text/plain with nosniff and a sandboxing policy, as we checked on November 20, 2026, so the browser shows the code there too. Open the file from your computer or from a website instead.

How do I run an HTML file from a GitHub repository?

Download it, or the whole repository with Code > Download ZIP, and open the .html file in your browser. If it uses module scripts or fetches data files, run a local server in its folder first. To run it for other people, publish it with GitHub Pages or at a link from an HTML host.

Is GitHub Pages free?

Yes, for public repositories on GitHub Free and GitHub Free for organizations; private repositories need GitHub Pro, Team, or Enterprise. GitHub's documentation also says GitHub Pages isn't for running an online business, an e-commerce site, or commercial software as a service. GitHub Pages limits has its size and bandwidth limits.

Sources

Next step

How to password protect an HTML page or website

A JavaScript password script leaves the password in the page source. To password protect an HTML page or link, encrypt the file or let a server check it.

Related articles

More ways to send your page

Share this article

See the HTML file run, at a link you can send

Upload the file from the repository once and publish it. The link opens the page with its scripts running, on any phone or computer, with no repository settings.

Get a link for my HTML file

Free plan: no credit card, 1 published page.