The reliable, free way to download a TikTok video in 2026 is yt-dlp, an open-source command-line downloader: no app to install, no upload, and no ads. yt-dlp has a native TikTok extractor, so a single public video usually downloads with one command. Paste a URL below, pick whether you want the video or just the audio, and copy the command:
Paste a TikTok URL, choose what to grab, and copy the command. It updates as you change the options.
Resolution is a maximum, not a guarantee. yt-dlp grabs the best quality at or below your pick, capped by what was actually uploaded. Choose 8K on a 720p video and you get 720p, not an error and not an upscale.
yt-dlp --merge-output-format mp4 "https://www.tiktok.com/@scout2015/video/6718335390845095173"Paste this into your terminal AI and it runs the command for you, installing the tool first if you do not have it. Works with Claude Code, OpenAI Codex CLI, Gemini CLI, GitHub Copilot CLI, Aider, Cursor Agent, Warp, OpenCode, Cline and any other CLI coding agent.
Goal: download the video from this TikTok link.
Run this command in my shell:
yt-dlp --merge-output-format mp4 "https://www.tiktok.com/@scout2015/video/6718335390845095173"
First check whether `yt-dlp` is installed (run `command -v yt-dlp`). If it is not, install it with my system's package manager before running anything: macOS `brew install yt-dlp ffmpeg`, Debian/Ubuntu `sudo apt install yt-dlp ffmpeg`, Fedora `sudo dnf install yt-dlp ffmpeg`, Windows `winget install yt-dlp ffmpeg`. Then run the command above.
Show me any command that needs sudo before you run it, tell me where the output file landed when you are done, and do not run anything else.You run this at your own risk. An AI agent can execute commands on your machine; review what it does before approving. TechEarl is not liable for the outcome, see the Terms of Service.
For most clips that is the whole job. The rest of this page is the detail behind those options: how short links work, what TikTok actually serves (including the watermark question), and what to do when a clip is gated or region-locked.
Download only what you have the right to. Saving your own posts, content you have permission to reuse, or clips you have been given the rights to is one thing; re-uploading someone else's video, stripping a creator's credit, or mass-scraping is another, and bulk downloading can violate TikTok's Terms of Service. Respect the creator. This guide is for the legitimate cases. What you do with the file is on you.
Install yt-dlp (and ffmpeg)
Pick your platform. Install ffmpeg too: yt-dlp uses it to remux and to extract audio, and a missing ffmpeg is the most common reason an otherwise-fine download fails to convert.
Pick your OS for the install command.
# Cross-platform and always current:
pipx install yt-dlp
sudo apt install ffmpeg # or your distro's package managerKeep yt-dlp current. This matters more for TikTok than almost any other site: TikTok changes its API and player frequently, and a stale yt-dlp simply stops extracting. pipx install yt-dlp (then pipx upgrade yt-dlp) is the cleanest cross-platform install; the standalone binary self-updates with yt-dlp -U, and Homebrew uses brew upgrade yt-dlp. When a TikTok download suddenly fails, updating is the first thing to try, not the last.
Download a single TikTok video
The native extractor means a public video needs nothing more than the URL. No cookies, no flags:
# A single public TikTok video
yt-dlp "https://www.tiktok.com/@user/video/VIDEO_ID"TikTok's share buttons hand out shortened links rather than the full canonical URL. Those work too; yt-dlp follows the redirect to the real video:
# A short share link works too
yt-dlp "https://vm.tiktok.com/XXXXXXX/"Both vm.tiktok.com and vt.tiktok.com short links resolve correctly. Quote the URL in your shell either way, because TikTok URLs can contain characters the shell would otherwise interpret.
What about the watermark?
The bouncing username and TikTok logo you see on shared clips are added when a video is exported through TikTok's in-app save/share buttons. yt-dlp does not go through that path: it asks TikTok's API for the source stream. Whether that stream carries the watermark is TikTok's call, and it varies by clip, region, and day, so this is not something any tool can promise. List what is on offer and choose a format yourself:
# See every format TikTok offers for this clip
yt-dlp -F "URL"TikTok labels its streams in that output (Download video, watermarked versus Download video), so you can select one with -f <id> when more than one exists. If the only format listed carries the watermark, no tool can strip it back off. Either way, running yt-dlp locally avoids the ads, trackers, redirect popups, and daily limits of the downloader websites, and the request never leaves your machine.
Gated, private, or region-locked clips
A public video needs no authentication. If a clip is region-locked, age-gated, or otherwise visible only to a logged-in account, hand yt-dlp your browser's cookies so the request carries your session:
# Gated / region-locked content you can access while logged in
yt-dlp --cookies-from-browser firefox "URL"Use Firefox, not Chrome. Since Chrome 127 (late July 2024) Chrome on Windows guards its cookie store with app-bound encryption, and external tools (yt-dlp included) can no longer read those cookies; on macOS the Keychain-protected store causes the same kind of grief. Firefox keeps its cookies in a plain SQLite database, so --cookies-from-browser firefox is the one that reliably works across platforms in 2026. Log into TikTok in Firefox first, then run the command. This only lets you download what your own account can already see; it does not bypass anything.
Save it with a clean filename
By default yt-dlp names the file with the numeric ID baked in. An output template (-o) gives you something readable, and .50s truncates a long caption so the filename stays sane:
# Clean filename
yt-dlp -o "%(uploader)s - %(title).50s.%(ext)s" "URL"%(uploader)s, %(title)s, and %(ext)s are output-template fields; there are dozens more (%(upload_date)s, %(id)s) if you want to build a tidy folder structure for a whole collection.
Just the audio (the sound)
If it is the sound or song you want rather than the video, extract the audio directly instead of downloading the clip and stripping it:
# Just the audio (the sound/song)
yt-dlp -x --audio-format m4a "URL"-x extracts audio; --audio-format m4a keeps the AAC track in a widely-playable container without a heavy re-encode. To pull every post from one creator at once, see download a TikTok profile for the whole-account workflow with an archive file. For every flag in one place, the yt-dlp cheat sheet is the reference.
Download TikTok slides (photo posts)
yt-dlp downloads TikTok videos and their audio, but it does not download slides: TikTok's photo posts, the swipeable image carousels (also called photo mode or a slideshow). When yt-dlp resolves a TikTok photo post through its extractor, it pulls only the background audio track, never the pictures. That is the tell: if a download leaves you with a lone .mp3 or .m4a and no images, the post was a slideshow, not a video. It is a limitation of yt-dlp's extractor, not something a flag fixes.
For the images, reach for gallery-dl, a command-line gallery downloader with a native TikTok extractor that understands photo posts. Install it once:
# macOS
brew install gallery-dl
# Linux / Windows (cross-platform, always current)
pipx install gallery-dlOut of the box, gallery-dl drops every file into one folder per creator. The filenames do carry the post ID, so they are at least sortable, but a few multi-image posts quickly pile up into a wall of loose files in a single directory. The fix is to set a download folder and group each post into its own subfolder:
Where the images land. gallery-dl creates this folder, then a subfolder per creator and per post.
# One TikTok slideshow, images grouped in their own folder
gallery-dl -d ~/TikTokSlides \
-o 'directory=["{user}","{id}"]' \
"https://www.tiktok.com/@user/photo/PHOTO_ID"With the defaults filled in, that command is:
gallery-dl -d ~/TikTokSlides -o 'directory=["{user}","{id}"]' "https://www.tiktok.com/@user/photo/PHOTO_ID"-d is the base folder, which gallery-dl creates if it does not exist. The -o directory=... template builds a subfolder per creator and per post, so a ten-image slideshow lands together in <folder>/<creator>/<post-id>/, each picture saved at its original resolution and numbered with a _01 through _10 suffix, instead of scattered across one directory. A slideshow also carries a background sound, which gallery-dl saves next to the images; if you want the pictures only, add -o audio=false. A single public photo post often works with no login at all; if it returns nothing or asks you to sign in, pass your session the same way you would for a video, with --cookies-from-browser firefox.
If a download returns nothing or an Unsupported URL error, update gallery-dl first (brew upgrade gallery-dl, or pipx upgrade gallery-dl), exactly as a stale yt-dlp stops working on TikTok; re-exporting fresh Firefox cookies clears up most of the rest. To grab every slideshow from a whole account in one go, see download a TikTok profile, which covers the gallery-dl profile pull with an archive file.
FAQ
Sometimes, but it is not something to count on. The watermark is baked in when a clip is exported through TikTok's app; yt-dlp instead asks TikTok's API for the source stream, which may or may not carry the watermark depending on the clip, your region, and the day. Run yt-dlp -F URL to see what is on offer and pick a format if more than one is listed; if the only available format carries the watermark, no tool can remove it.
Yes. yt-dlp is free and open source (released into the public domain under the Unlicense), with no ads, no paywall, and no download limits. Unlike the "free TikTok downloader" sites that wrap a tool like this in ads, yt-dlp runs entirely on your own machine and costs nothing.
Yes. Paste the short share link straight into the command and yt-dlp follows the redirect to the real video URL, then downloads it the same way. Both vm.tiktok.com and vt.tiktok.com links resolve correctly.
TikTok changes its API and player often, and a stale yt-dlp stops extracting when it does. Update first: yt-dlp -U for the standalone binary, or pipx upgrade yt-dlp / brew upgrade yt-dlp for managed installs. If updating does not fix it, the clip may be private or region-locked, which needs the cookies flag below.
Pass your browser cookies: yt-dlp --cookies-from-browser firefox URL. Log into TikTok in Firefox first. Use Firefox rather than Chrome, because Chrome's cookie store has been encrypted since mid-2024 and external tools can no longer read it. This only downloads what your own logged-in account can already see.
Yes, but the bulk approach differs (output templates, a download archive so re-runs skip what you already have, and rate limiting). See download a TikTok profile for the whole-account workflow.
That post was a slideshow (a photo carousel), not a video. yt-dlp downloads TikTok videos and audio, but it cannot pull the images from a photo post, so it falls back to saving only the background sound. To download the pictures, use gallery-dl: gallery-dl -d ~/TikTokSlides -o 'directory=["{user}","{id}"]' "URL" groups each slideshow's images in their own folder. See the slides section above.
See also
- Download a TikTok profile: pull every post from one creator with an archive file and output templates.
- Download a YouTube video: the same tool on YouTube, with resolution selection and the bot-check fix.
- yt-dlp cheat sheet: every flag worth knowing, in one reference.
Sources
Authoritative references this article was fact-checked against.
- yt-dlp README (official)github.com
- yt-dlp supported sites (official, lists TikTok)github.com
- yt-dlp FAQ: passing cookies (official wiki)github.com
- yt-dlp TikTok extractor source (watermark format preference)github.com
- Google Security Blog: app-bound encryption for Chrome cookies (July 2024)security.googleblog.com
- gallery-dl README (official, downloads TikTok photo posts)github.com
- gallery-dl supported sites (lists TikTok)github.com





