How to Add a Black Hole Simulator to Your Website
LK Forge · 4 min read · Updated September 2026
You can add a full black hole visualisation to any website, blog, or classroom page with a single line of code — free, with no sign-up, no plugin, and no script to install. Visitors watch matter spiral into an event horizon and read off the real Schwarzschild sizes. This guide covers the fastest way to embed the Black Hole Simulator, what it teaches, and where it works.
The quickest way: paste one embed snippet
An embed is just an <iframe> that loads the simulator from lkforge.com, plus a small credit line. Copy this into your page’s HTML where you want the widget to appear:
<iframe src="https://lkforge.com/embed/black-hole/"
width="100%" height="780" loading="lazy"
style="border:0;max-width:560px"
title="Black Hole Simulator by LK Forge"></iframe>
<p><a href="https://lkforge.com/tools/physics/black-hole/">Black Hole Simulator</a>
by <a href="https://lkforge.com/">LK Forge</a></p> The <iframe> is the live simulator; the <p> underneath is a plain credit link. Keep that line — the visible link is what keeps the widget free to embed. You can also copy this exact code straight from the LK Forge widget gallery.
What the widget shows
The simulator opens with a black hole already accreting, so a visitor sees the disk turning immediately and can then take control:
- The event horizon: the black shadow whose size is the Schwarzschild radius.
- The photon ring: the bright ring of trapped light at 1.5 Rs.
- The accretion disk: Doppler-beamed so the approaching side glows brighter.
- Mass slider and readouts: the Schwarzschild radius, photon sphere and innermost stable orbit in kilometres.
Pick the right height
The snippet uses height="780", which fits the view, the slider and the readouts without clipping even on a narrow phone, where they stack into one column. On a wider page the widget centres within its max-width:560px. That single height works across screen sizes, so there is nothing to tweak for mobile.
Where it works
Because it is a standard iframe, the embed works anywhere you can add HTML:
- WordPress: add a Custom HTML block and paste the snippet.
- Squarespace: use a Code / Embed block.
- Wix: add an Embed HTML / iframe element.
- Ghost: insert an HTML card.
- Notion: paste the
/embed/black-hole/URL and choose "Create embed". - Plain HTML, an intranet, or a lesson page: paste the snippet straight into the markup.
That’s the whole job. Copy the embed code from the widget gallery and paste it wherever a physics or astronomy lesson on black holes, general relativity or the Event Horizon Telescope needs a hole students can actually resize.
Grab the embed code from the LK Forge widget gallery — free, no sign-up.
Open the Black Hole SimulatorFrequently asked questions
- Is embedding the black hole simulator free?
- Yes. It is free to embed on any site, with no account, no API key and no usage limits. The whole visualisation runs in your visitor’s own browser, so there is no server cost — we only ask that you keep the small "Black Hole Simulator by LK Forge" credit line that comes with the embed code.
- What can visitors do with the embedded simulator?
- They can watch a glowing accretion disk orbit a black event horizon ringed by a bright photon ring, with the disk brighter on the side beamed toward them. A mass slider sets the black hole’s mass, and a live panel shows the exact Schwarzschild radius, the photon sphere at 1.5 Rs and the innermost stable circular orbit at 3 Rs for that mass. They can also toggle the accretion disk on or off.
- Is the black hole physically accurate?
- The visualisation is illustrative — the sizes and colours are chosen for clarity, not drawn to scale, and it does not ray-trace the light-bending of a real image. But the numbers are real: the Schwarzschild radius comes from the exact formula Rs = 2GM/c², and the photon sphere and innermost stable orbit are the correct 1.5 Rs and 3 Rs. The Doppler-beamed, lopsided disk reflects real relativistic beaming.
- What iframe height should I use, especially on mobile?
- The snippet ships with height="780", which is tall enough that the black hole view, the mass slider and the readouts all fit without clipping even on a narrow phone where everything stacks into a single column. On a wider page the widget simply centres within its max-width of 560px. If you want it shorter you can lower the height, but 780 is the safe default across screen sizes.
- Where can I embed it — WordPress, Wix, Squarespace, Notion?
- Anywhere you can add HTML, because it is a standard iframe. In WordPress use a Custom HTML block; in Squarespace a Code/Embed block; in Wix an Embed HTML element; in Ghost an HTML card; in Notion paste the /embed/black-hole/ URL as an embed. On a plain HTML page or an intranet, paste the snippet straight into the markup.
- Does the embedded simulator track visitors or set cookies?
- No. Everything runs locally in the visitor’s browser — nothing is uploaded. The embed sets no tracking cookies and sends no analytics, so it is safe to place on a privacy-sensitive site, an intranet, or a page for students.