PinDrop is a free, open-source web application that helps you discover, generate, and share DIGIPIN codes for any location in India. DIGIPIN (Digital Postal Index Number) is India Post's revolutionary digital address system that converts GPS coordinates into simple 10-character alphanumeric codes with 4x4 meter accuracy.
- 🆓 Completely Free - No registration, no limits, no ads
- 🎯 Precise - 4x4 meter location accuracy
- 📱 Mobile-First - Works beautifully on any device
- 🔗 Easy Sharing - QR codes, links, WhatsApp, and more
- 🌍 WorldPIN Support - Generate location codes globally
- ⚡ Fast - Instant DIGIPIN generation
- 🔒 Private - No data stored, works offline
- Click anywhere on the map to generate a DIGIPIN
- Search by place name, address, or existing DIGIPIN
- Use your current location with one tap
- Smooth pan and zoom with OpenStreetMap
- Instant DIGIPIN code generation for any location
- Convert DIGIPIN back to GPS coordinates
- Copy to clipboard with one click
- Supports both DIGIPIN (India) and WorldPIN (Global)
- Generate QR codes for any DIGIPIN
- Share via WhatsApp, Email, or any app
- Create shareable links
- Download PIN Cards as images
- Beautiful, shareable location cards
- Include QR code, coordinates, and address
- Download as PNG or PDF
- Perfect for business cards, deliveries, or emergencies
- Coordinates → DIGIPIN
- DIGIPIN → Coordinates
- Batch conversion support
- Real-time validation
| Technology | Purpose |
|---|---|
| Next.js 14 | React framework with App Router |
| TypeScript | Type-safe JavaScript |
| Tailwind CSS | Utility-first styling |
| Leaflet | Interactive maps |
| Framer Motion | Animations |
| QRCode | QR code generation |
| Lucide React | Icons |
- Node.js 18+
- npm or yarn
-
Clone the repository
git clone https://github.com/Chandu4143/pindrop.git cd pindrop -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env.local
Edit
.env.localif you need to configure any API keys. (no APIs for now, but let it be there for the future) -
Run the development server
npm run dev
-
Open in browser
http://localhost:3000
npm run build
npm startTo generate PNG icons from the SVG source:
npm install sharp --save-dev
npm run generate-iconspindrop/
├── public/ # Static assets
│ ├── icon.svg # App icon
│ ├── manifest.json # PWA manifest
│ └── robots.txt # SEO robots file
├── src/
│ ├── app/ # Next.js App Router
│ │ ├── layout.tsx # Root layout with SEO
│ │ ├── page.tsx # Main page
│ │ ├── metadata.ts # SEO metadata
│ │ └── ...
│ ├── components/ # React components
│ │ ├── MapContainer*.tsx
│ │ ├── Sidebar.tsx
│ │ ├── BottomDrawer.tsx
│ │ ├── SearchBar.tsx
│ │ ├── ShareModal.tsx
│ │ ├── PinCard.tsx
│ │ └── ...
│ ├── services/ # Business logic
│ │ ├── encoding.ts # DIGIPIN encoding/decoding
│ │ ├── geocoding.ts # Address lookup
│ │ └── ...
│ ├── lib/ # Utilities
│ │ └── worldpin.ts # WorldPIN algorithm
│ └── types/ # TypeScript types
├── scripts/ # Build scripts
└── package.json
DIGIPIN divides India into a grid of 4m × 4m cells. Each cell is assigned a unique 10-character code using a base-10 character set. The algorithm:
- Takes latitude and longitude coordinates
- Maps them to a grid cell within India's boundaries
- Encodes the cell position as a 10-character string
- Format:
XXX-XXX-XXXX(with hyphens for readability)
Location: India Gate, New Delhi
Coordinates: 28.6129° N, 77.2295° E
DIGIPIN: 3PJ-7KL-4MN2
import { encode, decode } from '@/services/encoding';
// Generate DIGIPIN from coordinates
const result = encode({ latitude: 28.6129, longitude: 77.2295 }, 'india');
// { success: true, pin: '3PJ-7KL-4MN2' }
// Decode DIGIPIN to coordinates
const location = decode('3PJ-7KL-4MN2', 'india');
// { success: true, coordinates: { latitude: 28.6129, longitude: 77.2295 } }import { buildUrl, parseUrlParams } from '@/services/url';
// Create shareable URL
const url = buildUrl('3PJ-7KL-4MN2', 'india');
// https://pindrop-digipin.vercel.app/?pin=3PJ-7KL-4MN2&mode=india
// Parse URL parameters
const params = parseUrlParams(new URLSearchParams(window.location.search));
// { pin: '3PJ-7KL-4MN2', mode: 'india' }| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm start |
Start production server |
npm run lint |
Run ESLint |
npm test |
Run tests |
npm run generate-icons |
Generate PNG icons |
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- India Post for the DIGIPIN system
- OpenStreetMap for map tiles
- Nominatim for geocoding
PinDrop is an independent, unofficial tool. DIGIPIN is a service by India Post. This application is not affiliated with or endorsed by India Post or the Government of India.
Made with ❤️ in India