Online Notepad

Simple notepad for quick notes, checklists, and shopping lists with browser-based storage.

Back to all tools on ToolForge

More in Productivity



About Online Notepad

This online notepad provides three specialized modes for different note-taking needs: plain text notes, interactive checklists, and categorized shopping lists. All data is stored locally in your browser using the localStorage API.

localStorage Storage Mechanism

localStorage is a Web Storage API that provides persistent key-value storage in the browser:

Property Details
Storage Limit 5-10MB per origin (varies by browser)
Data Type String only (objects require JSON.stringify)
Persistence Indefinite until explicitly cleared
Scope Shared across all tabs/windows of same origin
API Type Synchronous (blocks main thread)
Private Browsing Data lost when session ends

Storage Key Structure

// This tool uses namespaced keys to avoid collisions:
const STORAGE_KEYS = {
  notes:     "toolforge.notes-lists.notes",
  checklist: "toolforge.notes-lists.checklist",
  shopping:  "toolforge.notes-lists.shopping"
};

// Save data:
localStorage.setItem(STORAGE_KEYS.notes, textValue);

// Load data:
const saved = localStorage.getItem(STORAGE_KEYS.notes) || "";

// Clear data:
localStorage.removeItem(STORAGE_KEYS.checklist);

// Export all data:
const exportData = {
  notes: localStorage.getItem(STORAGE_KEYS.notes),
  checklist: localStorage.getItem(STORAGE_KEYS.checklist),
  shopping: localStorage.getItem(STORAGE_KEYS.shopping)
};

Checklist Format Specification

Each line represents one task item. The format is simple plain text:

Input (one item per line):
Buy milk
Send email to team
Pack charger
Call dentist

Rendered Output:
☐ Buy milk
☐ Send email to team
☐ Pack charger
☐ Call dentist

Shopping List Category Format

Use pipe character (|) to separate category from item name:

Input Format:
Category|Item Name

Example Input:
Produce|Apples
Produce|Bananas
Dairy|Milk
Dairy|Eggs
Meat|Chicken
Other|Paper towels

Rendered Output:
Produce
- Apples
- Bananas

Dairy
- Milk
- Eggs

Meat
- Chicken

Other
- Paper towels

Mode Comparison

Feature Notes Checklist Shopping List
Input Format Free text One item per line Category|Item
Output Preserved whitespace Interactive checkboxes Grouped by category
Best For General notes Task tracking Organized lists
Copy Format As-is Markdown bullets Grouped text

Rendering Algorithm

// Notes rendering - preserves whitespace
function renderNotes(value) {
  if (!value) return '

No notes yet.

'; return '
' +
         escapeHtml(value) +
         '
'; } // Checklist rendering - creates interactive checkboxes function renderChecklist(value) { const lines = value.split(/\r?\n/) .map(line => line.trim()) .filter(Boolean); if (!lines.length) return '

No checklist items yet.

'; return lines.map(item => '' ).join(''); } // Shopping list rendering - groups by category function renderShopping(value) { const groups = {}; value.split(/\r?\n/) .map(line => line.trim()) .filter(Boolean) .forEach(line => { const parts = line.split('|'); const group = parts.length > 1 ? (parts[0] || 'Other').trim() : 'Other'; const item = parts.length > 1 ? parts.slice(1).join('|') : parts[0] || ''; if (!groups[group]) groups[group] = []; groups[group].push(item.trim()); }); const keys = Object.keys(groups); if (!keys.length) return '

No shopping items yet.

'; return '
' + keys.map(group =>
    group + '\n- ' + groups[group].join('\n- ')
  ).join('\n\n') + '
'; } // HTML escape for XSS prevention function escapeHtml(value) { return value .replace(/&/g, '&') .replace(//g, '>'); }

Browser Storage Comparison

Storage Type Capacity Persistence Server Access
localStorage 5-10MB Until cleared Client only
sessionStorage 5-10MB Tab session only Client only
Cookies 4KB per cookie Configurable expiry Sent to server
IndexedDB Large (varies) Until cleared Client only

Data Export and Backup

Since data is stored locally in the browser, consider these practices for data portability:

// Export all ToolForge data from browser console:
const data = {};
const prefix = 'toolforge.notes-lists.';
['notes', 'checklist', 'shopping'].forEach(mode => {
  data[mode] = localStorage.getItem(prefix + mode);
});
console.log(JSON.stringify(data, null, 2));
// Copy the output and save as JSON file

Common Use Cases

Security Considerations

Concern Mitigation
XSS Attacks HTML escaping on all output
Data Loss Manual backup via Copy Output
Private Browsing Data lost on session end
Shared Devices Use Clear button after sensitive use

How to Use Online Notepad

  1. Select mode: Choose Notes, Checklist, or Shopping List from the dropdown.
  2. Enter content: Type or paste your content in the text area.
  3. Render (optional): Click Render to see formatted output with checkboxes or categories.
  4. Save: Click Save to store in browser localStorage.
  5. Copy Output: Export the rendered content to clipboard.

Tips

Frequently Asked Questions

How does localStorage persistence work?
localStorage is a Web API that stores data as key-value pairs in the browser. Data persists across page reloads and browser sessions until explicitly cleared. Each origin (domain) has its own isolated storage with a typical 5-10MB quota. Data is accessed via localStorage.setItem(key, value) and localStorage.getItem(key).
What is the checklist format?
The checklist mode treats each line as a separate task item. Enter one task per line. The rendered view displays each item with a checkbox for interactive tracking. Empty lines are automatically filtered out. This format is ideal for task lists, packing lists, and step-by-step procedures.
How does the shopping list categorization work?
Use the pipe character (|) to separate category from item: 'Produce|Apples' groups 'Apples' under 'Produce'. Items without a category default to 'Other'. The rendered output groups items by category with headers, making it easier to navigate stores by section.
What are localStorage limitations?
localStorage limits: 5-10MB per origin depending on browser, synchronous API (can block main thread), string-only values (objects must be JSON.stringify'd), no expiration mechanism, cleared by browser cache clearing, and not available in private/incognito mode (data lost on close).
How to export notes from localStorage?
Access localStorage via browser console: JSON.parse(localStorage.getItem('toolforge.notes-lists.notes')). To export all data: Object.keys(localStorage).filter(k=>k.startsWith('toolforge')).reduce((acc,k)=>{acc[k]=localStorage[k];return acc},{}). Copy the result or use download scripts.
What is the difference between localStorage and sessionStorage?
localStorage persists indefinitely until cleared; sessionStorage only lasts for the current browser tab session. localStorage is shared across all tabs/windows of the same origin; sessionStorage is per-tab. localStorage has no automatic expiration; sessionStorage clears when the tab closes.