Widgets

How to Add an Aurora Simulator to Your Website

LK Forge · 4 min read · Updated September 2026

You can add an interactive aurora simulator 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 charged particles from the solar wind spiral along Earth’s magnetic field and light up the northern and southern lights, then turn the solar wind up to a storm and see the aurora brighten. This guide covers the fastest way to embed the 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/aurora-simulator/"
        width="100%" height="900" loading="lazy"
        style="border:0;max-width:720px"
        title="Aurora Simulator by LK Forge"></iframe>
<p><a href="https://lkforge.com/tools/physics/aurora-simulator/">Aurora 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 on a lit aurora, so a visitor sees the northern and southern lights immediately and can then take control:

  • Particles spiralling along the field: solar-wind particles follow Earth’s dipole field lines; the ones aimed almost straight down a line reach the upper atmosphere near both poles.
  • An aurora that comes from the physics: curtains glow only where simulated particles land, on rings around each pole, in the real colours — green and red from oxygen, purple from nitrogen.
  • Radiation belts: particles with steeper pitch angles are reflected by the magnetic mirror and bounce between the hemispheres, trapped in the Van Allen belts.
  • Solar wind and field strength: one slider goes from calm to storm; the other multiplies the field and shows the spiral radius r = mv/qB shrinking, with live counts of particles reaching the atmosphere and trapped.

Pick the right height

The snippet uses height="900", which fits everything without clipping, and the widget centres within its max-width:720px on a wider page. Because it is a self-contained dark card with its own background, it reads the same whether your site is light or dark — there is nothing to restyle.

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/aurora-simulator/ 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 lesson or a blog post on space weather, magnetism or the northern lights needs an aurora students can actually switch on.

Grab the embed code from the LK Forge widget gallery — free, no sign-up.

Open the Aurora Simulator

Frequently asked questions

Is embedding the aurora simulator free?
Yes. It is free to embed on any site, with no account, no API key and no usage limits. The whole simulation runs in your visitor’s own browser, so there is no server cost — we only ask that you keep the small "Aurora Simulator by LK Forge" credit line that comes with the embed code.
What can visitors do with the embedded simulator?
It opens with the aurora already glowing. A solar-wind slider runs from calm to storm and changes how many particles arrive, and a field-strength slider (×1 to ×3) shows the spirals tightening as the field gets stronger. Live readouts count the particles reaching the atmosphere and those trapped in the radiation belts, and show the spiral radius. Pause and Reset buttons, a colour legend and a link to the live aurora forecast sit underneath.
Is the physics real?
The motion is. Each particle is moved by the Lorentz force F = q·v×B in an approximate slice of Earth’s dipole field, using a Boris integrator that conserves speed. Particles moving almost along the field (inside the loss cone) reach the atmosphere and the aurora is drawn only where they land, which puts it on the auroral ovals at about 60–65° latitude; the rest mirror and stay trapped. The picture is not to scale: the aurora’s height is exaggerated so it shows up, and the note under the widget says so.
What iframe height should I use, especially on mobile?
The snippet ships with height="900", which fits the canvas, both sliders, the buttons, the three readouts, the legend and the forecast link without clipping. On a wider page the widget centres within its max-width of 720px. You can lower the height if you want it shorter, but 900 is the safe default. The widget is a self-contained dark card, so it looks the same on light and dark pages.