Shortlist of the best sites to upload files, images, or paste code snippets to share with others for debugging.
More useful than huge lists since you only need a few of the best sites to work with.
Double check the Terms & Conditions around Hotlinking before you link from another site so you don't get blocked!
Also check the sites rights to your keep and redistribute your content permanently!
- Simplest
- Fast
- Syntax highlighting
- Expiration option
dpaste.sh is the shortest easiest command, auto-adds syntax highlighting, and prompts to approve text / code before uploading for safety.
curl -X POST https://dpaste.org/api/ -d "content=$text"
"https://dpaste.org/caVZ2"
The original code pasting site.
- Expiration option
- Web UI ok
- CLI poor experience
- requires API key authentication and too many fields
- use dpaste or Termbin for CLI easier pasting instead
pastebin.sh is a shorter easier command which auto-adds syntax highlighting, and prompts to approve text / code before uploading for safety.
Manually:
curl -X POST https://pastebin.com/api/api_post \
-d "api_dev_key=$API_KEY" \
-d "api_user_name=$USERNAME" \
-d "api_user_password=$PASSWORD" \
-d "api_option=paste" \
-d "api_paste_code=$text" \
-d "api_paste_name=$title" \
-d "api_paste_private=0" \
-d "api_paste_expire_date=N"
- Terminal-based pastebin
- Allows piping content directly from the command line to create pastes
- Plaintext TCP port
9999
will probably be blocked by your corporate firewall
termbin.sh is a shorter command, finds and uses whatever netcat is available or installs netcat if necessary. Prompts to approve text / code before uploading for safety.
Manually:
echo "$text" | nc termbin.com 9999
https://termbin.com/b2h7
- Minimalist UI
- Doesn't look like CLI works any more
- self-hosted pastebin alternative for text and code snippets
- easy to set up and use
curl -X POST https://pasty.lus.pm/api/pastes -d "$text"
Method Not Allowed
- Simple Minimalist Web UI
curl -X POST https://hastebin.com/documents -d "$text"
Requires access token:
{"message":"Unauthorized request: missing access token. To generate a token, go to https://toptal.com/developers/hastebin/documentation and follow the instructions."}
- Expiration option
- Syntax highlighting
- Password protection for private pastes
curl -X POST https://paste.ee/api -F 'key=your_api_key' -F 'paste=$text'
Requires API key:
{"status":"error","errorcode":3,"error":"error_invalid_key"}
Syntax highlighting site for 192 languages with automatic language detection.
Do not use it as a CDN, they will block it as you can see on this page when you try to click a link through to it from Stack Overflow:
https://highlightjs.org/not-a-cdn
- Easy to use in UI
- Harder to use on CLI compared to above anonymous
curl
uploads - Code paste or files
- Private or Public
- Has revisions
- Easy to track in your GitHub account
- Best used via GitHub CLI
- can be installed with
install_github_cli.sh
in DevOps-Bash-tools
- can be installed with
GitHub CLI:
gh auth login
gh gist create "$file" --public --description "My Gist"
or from standard input:
echo "$text" | gh gist create - --public --description "My Gist"
Create a Gist with multiple files:
gh gist create "$file1" "$file2" --public --description "My Multi-File Gist"
Doing even a basic post via curl is very inconvenient compared to the other specialist pastebin sites above:
curl -X POST https://api.github.com/gists \
-H "Authorization: token YOUR_GITHUB_TOKEN" \
-d '{
"description": "Description of your Gist",
"public": true,
"files": {
"file1.txt": {
"content": "$text"
}
}
}'
- Fast
- Simple
- up to 512MB
- Very basic as you can see from the ASCII page
- Retention is only 1 month to 1 year
0x0.sh is the shortest command, prompts to approve text / code before uploading for safety.
Manually:
curl -F "file=@$image" https://0x0.st
Output is simply the file URL:
https://0x0.st/X6d2.png
- Slow
- Permanent Retention!! Be Careful
- All uploads are Anonymous
- Up to 200MB
- Does not allow Hotlinking
- blocked in several countries like the UK, Australia etc.
- Tools Doc for how to use it
catbox.sh is the shortest command, prompts to approve text / code before uploading for safety.
Manually:
curl -F "reqtype=fileupload" \
-F "fileToUpload=@$image" \
https://catbox.moe/user/api.php
Output is just the file URL:
https://files.catbox.moe/pihtj4.png
By the same people as Catbox
- Slow
- Temporary - 1-72 hour expiry
- Up to 1GB
Litterbox with 1 day retention - doc
litterbox.sh is a shorter command, prompts to approve text / code before uploading for safety.
curl -F "reqtype=fileupload" \
-F "time=24h" \
-F "fileToUpload=@$image" \
https://litterbox.catbox.moe/resources/internals/api.php
Output is just the file URL:
https://litter.catbox.moe/toh6ua.png
Temporary anonymous file hosting with support for image uploads.
API Doc (for how to use curl).
curl -i -F "files[]=@$image" https://uguu.se/upload
Output is JSON:
{
"success": true,
"files": [
{
"hash": "6afdae66370604df",
"filename": "asKLYtPk.png",
"url": "https:\/\/f.uguu.se\/asKLYtPk.png",
"size": 37644,
"dupe": false
}
]
}
Unless you add ?output=text
to the URL:
curl -F "files[]=@$image" https://uguu.se/upload?output=text
in which it outputs just the URL:
https://f.uguu.se/hLquEFAW.png
Anonymous but free version auto-deletes file after 1 download!
Paid plans have optional expiration.
API Documentation: https://www.file.io/developers
Doesn't render images but gives a Download box button.
curl -F "file=@$image" https://file.io
file.io.sh is a shorter command, prompts to approve text / code before uploading for safety.
Useful to send things like graph or diagrams then reference them in GitHub docs without bloating your repos by constantly replacing the images in your repo.
Simplest to use again - see above 0x0.st
Popular image hosting site.
- UI insists on disabling Ad-blocker
- Anonymous uploads
- Direct links
- Robust well documented API
imgur.sh is the shortest command to upload.
Manually posting to Imgur is as simple as:
curl -H "Authorization: Client-ID YOUR_CLIENT_ID" \
-F "image=@$image" \
https://api.imgur.com/3/image
The output should look like this indicating success HTTP 200 status code:
{"status":200,"success":true,"data":{"id":"nsLltwo","deletehash":"UuID9Xe3MsmeUni","account_id":null,"account_url":null,"ad_type":null,"ad_url":null,"title":null,"description":null,"name":"","type":"image/png","width":1280,"height":720,"size":37103,"views":0,"section":null,"vote":null,"bandwidth":0,"animated":false,"favorite":false,"in_gallery":false,"in_most_viral":false,"has_sound":false,"is_ad":false,"nsfw":null,"link":"https://i.imgur.com/nsLltwo.png","tags":[],"datetime":1728939379,"mp4":"","hls":""}}
or piped through jq
to prettify it:
{
"data": {
"account_id": null,
"account_url": null,
"ad_type": null,
"ad_url": null,
"animated": false,
"bandwidth": 0,
"datetime": 1728939379,
"deletehash": "UuID9Xe3MsmeUni",
"description": null,
"favorite": false,
"has_sound": false,
"height": 720,
"hls": "",
"id": "nsLltwo",
"in_gallery": false,
"in_most_viral": false,
"is_ad": false,
"link": "https://i.imgur.com/nsLltwo.png",
"mp4": "",
"name": "",
"nsfw": null,
"section": null,
"size": 37103,
"tags": [],
"title": null,
"type": "image/png",
"views": 0,
"vote": null,
"width": 1280
},
"status": 200,
"success": true
}
But is heavily throttled, 2-3 requests results in this:
{"errors":[{"id":"legacy-api-78f9c8f745-s5j42/S6uT0TTUDU-25139224","code":"429","status":"Too Many Requests","detail":"Too Many Requests"}]}
- Anonymous
- UI only
- Does not allow Hotlinking
- No longer anonymous
- Images only
- Supported format:
jpg
,jpeg
,png
,gif
- Temporary - deleted after 6 months if not view, 1 year if not view for an account
- Hotlinking policy unknown
- 20MB per image
- no videos
curl -F "file=@$image" https://vgy.me/upload
Looks like anonymous uploads are no longer allowed in either the UI or curl
:
{"error":true,"messages":{"Unauthorized":"Anonymous uploads are not allowed."}}