Create a Number Spiral

Want to generate a grid where numbers swirl into a perfect spiral? Create a Number Spiral lets you do just that. Whether you’re exploring algorithms, visualizing number patterns, or building puzzles, this tool lets you form number spirals with ease.

It works directly in your browser with no reloading. Choose the spiral size, pick how it fills (like clockwise from top-left or center outward), and preview the result live. The grid updates as you change options, and you can export, copy, or import files to work faster.

Paste your input above or import a file below.
No file chosen
Supported file types: .txt, .csv, .tsv, .log, .json, .xml, .md, .ini, .yaml, .yml, .html, .htm, .css
Total items: 0
Options
Start from zero
Pad numbers with zeros
Show as grid

How to Use:

  1. Enter a single number like 5 in the “Spiral Size (N)” box to create an N×N grid.
  2. Optional: import a .txt, .csv, or other supported file with just a number in it.
  3. In the Options box:
    • Choose a Spiral Direction:
      • Clockwise from top-left
      • Counterclockwise from top-left
      • Clockwise from center outward
      • Counterclockwise from center outward
    • Toggle Start from zero to begin at 0 instead of 1
    • Turn on Pad numbers with zeros for even spacing
    • Toggle Show as grid to add line breaks for visual layout
  4. The spiral will appear in the “Number Spiral Output” box instantly.
  5. Use the buttons to copy, export, or clear the spiral.

What Create a Number Spiral can do:

The tool builds a numeric spiral pattern inside a square of your chosen size. You control how it fills from a corner, spiraling in, or starting from the center and spiraling outward. The result can appear as a space-formatted grid or as a flat comma-separated string, depending on your settings.

It also supports padding, zero-based counting, and file import so you can use spiral layouts in other projects or datasets.

Example:

Input: 4

Settings: Mode: Clockwise from top-left, Start from zero: OFF, Show as grid: ON, Pad with zeros: ON

Output:
01 02 03 04
12 13 14 05
11 16 15 06
10 09 08 07

Common Use Cases:

This tool’s great for creating puzzles, teaching matrix algorithms, testing pathfinding logic, or simply visualizing math. It can also be used for data layout in games, grid testing, or art generation. With multiple fill modes and clean formatting, it adapts to whatever spiral you need.

Useful Tools & Suggestions:

Want a different layout vibe? Create a Number Circle wraps your sequence around a loop instead of spiraling it out. Or go with Create a Number Tree if you’d rather build a layered, top-to-bottom structure.