SSJX.CO.UK
Content

Csv2Html Website Generator

Turn a spreadsheet table into a website with this easy to use command line tool!

Usage

The example below gives a more detailed example of how it can be used. To work, the program needs a minium of:

For a better site, the following can also be used or specified:

Worded Example

CSV Spreadsheet File

Although in theory you can create a website from any CSV file, the system works best if the first column is unique (e.g. product code / date) and the second column is descriptive in some way like an email subject.

This file can be saved with any name as it is passed to the command line utility.

ID,Model,Make,Colour,Notes
0,Ford Capri,Ford,Blue,Long car
1,Ford Mondeo,Ford,Red,Executive car 
2,Fiat Panda,Fiat,Blue,Tiny car
3,Fiat Coupe,Fiat,Red,Sporty car

Template Html File

The template page is used to show each row from the CSV file. Index pages are created if a field name is show with a square bracket e.g. [make]. This index page will list (for example) all makes of car and create a sub page containing a list of each car matching those makes. Field names with squiggly brackets get replace with the field contents e.g. {model}. The control buttons ( [prev], [home] and [next]) get set to the relevant page. The header / footer insert a seperate html file into the template as explained in more detail below.

This can be saved with any name as it is also passed to the command line utility.

<!DOCTYPE html>
<html>
<head>
<title>{make} / {model}</title>
<link rel="stylesheet" type="text/css" HREF="main.css">
</head>
<body>
[header|header.htm]
<p>
[home] | [make] | [colour]
</p>
<h2>Overview</h2>
<p>ID : {id}</p>
<p>Make : {make}</p>
<p>Model : {model}</p>
<p>Colour : {colour}</p>
<h2>Summary</h2>
<p>
{notes}
</p>

<p style="text-align:center">
[prev] [home] [next]
</p>

[footer|footer.htm]
</body>
</html>

Stylesheet

Optional and called 'main.css'. The control buttons can be styled too as shown below.

h1{font-family: Arial;}
h2{font-family: Arial;}
p{font-family: Arial;}

.prev{background-color:green}
.home{background-color:pink}
.next{background-color:yellow}

Page Header

Optional, the file name is after the '|' in the template. A Standard HTML fragment that if specified in the template, also gets glued to the top of every generated index page.

<h1>Welcome To My Car Website</h1>
<hr>

Page Footer

Optional, the file name is after the '|' in the template. A Standard HTML fragment that if specified in the template, also gets glued to the bottom of every generated index page.

<hr>
<p style="text-align:center"><a href="index.html">Home</a><br>(c)2026</p>

Creating The Website

To create the website, run the command with the spreadsheet file first followed by the template file as shown below:

>csv2html cars.csv template.html
Csv2Html v0.# Go (##/##/26) by ssjx (https://ssjx.co.uk)
--------------------------------------------------------
Loading Include: header.htm
Loading Include: footer.htm
Saving as 0.html
Saving as 1.html
Saving as 2.html
Saving as 3.html
Saving as index-make.html
Saving as index-ford.html
Saving as index-fiat.html
Saving as index-colour.html
Saving as index-blue.html
Saving as index-red.html
Saving as index.html

⚠️ Please note that this tool is not perfect, and it will likely fail on complex CSV files. It may get better over time so check back for updates!

Download

Download Csv2html Website Generator
606KB 7Zip
Version 0.1 (29/10/2026)