Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
A lightweight hosting platform for uploading and instantly deploying HTML/CSS/JavaScript pages with assets. Just drag and drop a folder and get a live URL.
✨ Super Simple
- Drag & drop your entire folder
- Auto-detects HTML, CSS, and JavaScript
- Uploads images, fonts, and assets automatically
- Get a live URL instantly
- No configuration required
🚀 Drag & Drop Interface
- Beautiful, intuitive upload experience
- Auto-detect page name from HTML filename
- Click to browse or drag folder directly
- Real-time asset preview
🔒 Secure & Fast
- Pages stored in fast KV blob cache
- Base64 encoding for all assets
- Data URIs for asset delivery
- Instant retrieval
⚡ Developer Friendly
- Full REST API with cURL examples
- JavaScript and Python integration examples
- Comprehensive API documentation
- Multipart form upload support
- Go to Upload - https://val.town/x/brybod123/Betlify/ui
- Drag Your Folder - Just drop your project folder (or click to browse)
- Auto-Setup - Page name, HTML, CSS, JS, and assets are automatically detected
- Click Upload - Host your page instantly
- Share Link - Get a live URL like
/pages/my-portfolio
The beautiful drag-and-drop upload interface.
Upload a new page programmatically.
Request:
multipart/form-data:
- pageName (string): URL slug for your page
- html (file): Main HTML file (required)
- css (file, optional): Stylesheet
- js (file, optional): JavaScript
- assets (file[], optional): Images, fonts, etc.
Response:
{ "success": true, "url": "/pages/my-portfolio", "fullUrl": "https://brybod123--9c3ff1a062aa11f187aa1607ee4eb77e.web.val.run/pages/my-portfolio" }
View full API documentation with examples.
Serve a hosted page with all CSS, JS, and assets injected.
-
Create a folder with your files:
my-portfolio/ ├── index.html ├── styles.css ├── script.js └── logo.png -
Drag the entire folder onto the upload area
-
Confirm page name and click "⚡ Upload & Host"
-
Share your page:
https://...val.run/pages/my-portfolio
curl -X POST https://val.town/x/brybod123/Betlify/api/upload \ -F "pageName=my-portfolio" \ -F "html=@index.html" \ -F "css=@styles.css" \ -F "js=@script.js" \ -F "assets=@logo.png"
const formData = new FormData();
formData.append('pageName', 'my-portfolio');
formData.append('html', htmlFile);
formData.append('css', cssFile);
formData.append('assets', imageFile);
fetch('/api/upload', {
method: 'POST',
body: formData
})
.then(res => res.json())
.then(data => console.log('Live at:', data.fullUrl));
import requests files = { 'html': open('index.html', 'rb'), 'css': open('styles.css', 'rb'), 'js': open('script.js', 'rb'), } data = {'pageName': 'my-portfolio'} response = requests.post( 'https://val.town/x/brybod123/Betlify/api/upload', data=data, files=files ) print(response.json()['fullUrl'])
- Images: PNG, JPG, GIF, SVG, WebP
- Fonts: WOFF, WOFF2, TTF
- Other: Any file type via base64
- Storage: Val Town's blob KV cache for instant hosting
- Runtime: Deno + TypeScript
- Asset Encoding: Base64 data URIs (no separate HTTP requests)
- MIME Types: Automatic detection
- CSS Injection: Into HTML
<head> - JS Injection: Before closing
</body>tag - Performance: Cached retrieval, zero cold starts
| Feature | Betlify | Traditional Hosting |
|---|---|---|
| Upload method | Drag & drop folder | Manual file upload |
| File detection | Automatic | Manual selection |
| Setup time | Instant | Minutes |
| Asset handling | Base64 data URIs | Separate HTTP requests |
| No sub-requests needed | ✓ | ✗ |
| API available | ✓ | Often extra cost |
| Custom domain support | Shared URL | ✓ |
Made with ❤️ on Val Town