Home
Name Modified Size InfoDownloads / Week
puzzle-engine.js < 11 hours ago 16.4 kB
puzzle-types.js < 11 hours ago 2.8 kB
app.js < 11 hours ago 18.5 kB
pdf-gen.js < 11 hours ago 8.2 kB
style.css < 11 hours ago 35.0 kB
test-logic.js < 11 hours ago 14.8 kB
index.html < 11 hours ago 24.0 kB
README.md < 11 hours ago 9.4 kB
robots.txt < 11 hours ago 74 Bytes
sitemap.xml < 11 hours ago 241 Bytes
test-all-controls.html < 11 hours ago 39.1 kB
_gitattributes < 11 hours ago 66 Bytes
favicon.svg < 11 hours ago 1.4 kB
Totals: 13 Items   170.0 kB 0

Sudoku Printable

Free printable Sudoku puzzle generator with 19 variant types, 4 grid sizes, 4 difficulty levels, and instant PDF download. No signup, fully client-side.

Live Site: sudokuprintable.me

Table of Contents

Features

  • 19 Sudoku variants — from Standard to Killer, Jigsaw, Thermo and more
  • 4 grid sizes — 4×4, 6×6, 9×9, and 16×16 (details)
  • 4 difficulty levels — Easy, Medium, Hard, Evil (details)
  • Batch generation — create 1, 4, 6, 9, 12, or 24 puzzles at once
  • Answer keys — None, Append (solutions after puzzles), or Only (answers only)
  • Live paper preview — see exactly what will print before downloading
  • High-quality PDF — vector output via pdf-lib, sharp at any DPI
  • Direct print — send puzzles straight to printer without saving a file
  • Large Print mode — bigger grids for accessibility and low-vision users
  • Font size control — Small / Medium / Large number sizing
  • 6 paper sizes — Letter, A4, A5, Legal, Tabloid, A3 (full list)
  • 100% client-side — all generation and rendering happens in the browser

Sudoku Variants

19 rule variants, each implemented as a self-contained plugin:

Variant Description
Standard Classic Sudoku — rows, columns, and boxes
Diagonal Both main diagonals must also contain all digits
Windoku Four extra shaded "window" boxes as constraints
Odd-Even Shaded cells must contain odd or even numbers
Knight No two identical digits a chess knight's move apart
King No two identical digits a chess king's move apart
Jigsaw Irregular-shaped regions replace standard boxes
Non-Consecutive Adjacent cells can't hold consecutive numbers
Disjoint Same position across all boxes must contain unique digits
Center Dot Center cells of all boxes form an extra group
Asterisk Nine marked cells must contain digits 1–9
Kropki Dot clues between cells indicate ratio or difference
Consecutive Bars mark pairs of consecutive numbers
Sandwich Clues show sum of digits between 1 and 9 in each row/column
Thermo Digits increase along thermometer paths
Arrow Digits along an arrow sum to the circle cell
Killer Cages with sum clues, no repeated digits within a cage
Skyscraper Edge clues count visible "skyscrapers" from that direction
Greater Than Inequality signs between adjacent cells

Grid Sizes & Difficulty

Grid Sizes

Size Digits Use Case
4×4 1–4 Young kids (ages 5–8), absolute beginners
6×6 1–6 Kids and warm-up puzzles
9×9 1–9 Standard format, all difficulty levels
16×16 1–16 (A–G) Advanced challenge (beta)

Difficulty Levels

Level Clues (9×9) Description
Easy 36–40 Simple logic, no guessing needed
Medium 32–35 Moderate concentration required
Hard < 31 Advanced elimination techniques
Evil Minimal Complex deduction chains, expert only

Paper Sizes

Size Dimensions
Letter 8.5 × 11 in
A4 210 × 297 mm
A5 148 × 210 mm
Legal 8.5 × 14 in
Tabloid 11 × 17 in
A3 297 × 420 mm

Tech Stack

Layer Technology Role
Puzzle Logic Vanilla JavaScript Puzzle engine with backtracking solver
PDF pdf-lib Vector PDF generation with embedded fonts
Fonts Fraunces + Manrope Headings and body typography
Testing Manual test suite test-logic.js for engine validation

Architecture

Plugin System

The app uses a plugin registry pattern — identical to the Graph Paper project's approach:

Puzzle Engine

js/puzzle-engine.js provides core generation primitives:

  • Base grid generation — mathematically valid grid via formula-based construction
  • Randomization — structure-preserving permutations (band/row/stack shuffle + digit relabeling)
  • Constraint validationisValid() accepts an optional extraCheck callback so variants inject custom rules without modifying the engine
  • Unique solution enforcementcountSolutions() with backtracking ensures exactly one valid solution
  • Clue removalremoveNumbers() strips cells while maintaining solvability, respecting difficulty targets

PDF Generation

js/pdf-gen.js uses pdf-lib for vector PDF output:

  • Adaptive layout — auto-calculates puzzles per page based on grid size, paper size, and large-print mode
  • Each variant can hook into pdfBackground() and pdfForeground() for custom decorations (shaded regions, thermometer paths, cage outlines, etc.)
  • 16×16 grids use hex labels (A–G for 10–16)
  • Answer pages rendered with filled grids in lighter styling

Adding a New Variant


1. Create js/variants/my-variant.js
2. Call PuzzleTypes.register({ id, label, description, supportedSizes, generate, ... })
3. Add <script src="js/variants/my-variant.js"></script> in index.html

No changes to puzzle-engine.js, puzzle-types.js, or app.js required.

Project Structure

sudoku-printable/
├── index.html                  # Single-page application
├── css/
│   └── style.css               # All styles
├── js/
│   ├── puzzle-engine.js        # Core generation engine (grid, solver, clue removal)
│   ├── puzzle-types.js         # Variant plugin registry
│   ├── app.js                  # UI controller (preview, state, event handling)
│   ├── pdf-gen.js              # PDF generation via pdf-lib
│   ├── variants/               # One file per Sudoku variant (19 plugins)
│   │   ├── standard.js
│   │   ├── diagonal.js
│   │   ├── killer.js
│   │   ├── jigsaw.js
│   │   ├── thermo.js
│   │   └── ... (19 total)
│   └── vendor/
│       └── pdf-lib.min.js      # Bundled pdf-lib with CDN fallback
├── favicon.svg
├── robots.txt
├── sitemap.xml
├── test-logic.js               # Engine logic test suite
└── test-all-controls.html      # Manual UI control test page

Getting Started

No build step required. Open index.html directly in a browser:

# Option 1: direct open
open index.html

# Option 2: any static server
npx serve .

All puzzle generation runs client-side — no network requests needed (pdf-lib is bundled locally with a CDN fallback).

Testing

  • test-logic.js — automated engine tests covering grid generation, constraint validation, solution uniqueness, and clue removal across all grid sizes
  • test-all-controls.html — manual UI test page for verifying all controls, settings combinations, and variant rendering

SEO

  • JSON-LD structured data — WebApplication + FAQPage (7 questions)
  • Semantic content sections — difficulty guide, kids/students guide, grid sizes, benefits
  • Canonical URL, Open Graph, and Twitter Card meta
  • Sitemap and robots.txt

License

ISC

Source: README.md, updated 2026-04-18