Safe YouTube is a Youtube app replacement for parents who want better common-sense parental controls for YouTube.
You deploy it yourself for free. You don't need to sign up. You don't need a database. You do not need to be technical to use the basic setup.
This project is mainly for parents who want to:
- block obvious garbage by keyword
- only allow trusted channels
- only allow exact videos
- make rapid video-hopping less rewarding
- deploy a private family version without building a complicated system
Instead of giving a child normal YouTube, this app gives them a filtered wrapper.
You control the rules in safe-youtube.config.jsonc.
That file can do all of this:
simpleSettings: easy yes/no switches near the top of the filetopNote: a small line of text at the very top of the app, likeBuilt for Nina and Maxcategories: big home-screen buttons that parents define in the config, including optional emoji labels. Each one runs a search using the words insearchFor.blocklistmode: normal search, but hide results that match blocked words, channels, or videosallowlistmode: only show approved searches, approved channels, or approved videos- feature trusted channels on the home page
- feature parent-picked videos on the home page
- turn on a rapid-switch guard that slows down constant video hopping
The main file is:
safe-youtube.config.jsonc
It uses jsonc, which means it can include comments. The comments inside the file explain what each setting does in plain language.
For most parents, the easiest place to start is the simpleSettings block near the top.
This repo includes ready-made sample configs in sample-configs/.
Available presets:
sample-configs/01-parent-starter-blocklist.jsoncsample-configs/02-approved-channels-only.jsoncsample-configs/03-slower-switching.jsoncsample-configs/04-exact-videos-only.jsonc
If you do not want to start from scratch:
- Open one of the files in
sample-configs/ - Copy everything in it
- Paste it into
safe-youtube.config.jsonc - Change the text, channels, words, or video links to fit your child
If you want the shortest path:
- Fork this repo on GitHub
- Copy one preset from
sample-configs/intosafe-youtube.config.jsonc - Edit the top
simpleSettingsswitches, then the words, channels, or videos - Import your fork into Vercel
- Click Deploy
- Open the site on the iPad in Safari
- Use Share -> Add to Home Screen
- Open this repository on GitHub
- Click Fork in the top right
- Keep the default options unless you know you want something different
- Wait for GitHub to create your own copy
After that, you will have your own version of the project in your GitHub account.
If you want a head start:
- Open the
sample-configsfolder in your fork - Pick the sample that is closest to what you want
- Open that file
- Copy everything in it
- Open
safe-youtube.config.jsonc - Replace its contents with the sample you copied
If you prefer, you can skip this and just edit safe-youtube.config.jsonc directly.
- Open
safe-youtube.config.jsonc - Click the pencil icon
- Change the values you want
- Scroll down and save the file
In most cases, you only need to:
- change
1to0, or0to1, in the topsimpleSettingsblock - optionally add a short
topNotelikeBuilt for Nina and Max - change words inside quotes
- add or remove lines inside lists
- edit the
categoriesbutton text and thesearchForphrase Safe YouTube should search for - optionally change
blocklistandallowlistlater if you want more advanced control
- Go to Vercel
- Sign in with GitHub
- Click Add New and then Project
- Choose your fork of this repository
- Leave the default settings alone unless you already know you need something different
- Click Deploy
- Wait for the first deployment to finish
- Open the live URL Vercel gives you
There are no environment variables required for the default setup.
If you already have a live copy of the app, you can also open /jsonc-checker
on that site and paste your config there before your next deployment.
- Open your deployed site in Safari on the iPad
- Tap the Share button
- Tap Add to Home Screen
- Open it from the new icon
It will feel more like an app and less like a normal browser tab.
Near the top of the config file, you will see:
How to read those:
1means yes0means no
What each one does:
allowSearching: show the typing search boxallowOnlyApprovedChannels: only allow videos from the channels inallowedChannelsallowOnlyApprovedVideos: only allow the exact video links inallowedVideosslowDownFastSwitching: turn on the pause that makes constant video hopping less rewarding
Important:
- if
allowOnlyApprovedChannelsis1, fill inallowedChannelsbelow - if
allowOnlyApprovedVideosis1, fill inallowedVideosbelow, or the app may feel empty - if
allowSearchingis0, kids can still tap topic buttons and trusted channels - most parents can use these top switches without touching the advanced mode settings below
This is the more advanced layer. Most parents can start with simpleSettings first.
Use this if you want YouTube search to feel mostly normal, but with obvious junk filtered out.
Example:
"mode": "blocklist",
"blockedWords": ["horror", "gore", "violence", "prank"],
"blockedChannels": [],
"blockedVideos": []What it does:
- lets the child search normally
- hides results that match blocked words
- hides results from blocked channels
- hides exact blocked videos
Use this if you want the stricter approach.
Example:
"mode": "allowlist",
"allowedSearchTerms": ["animals", "space", "drawing"],
"allowedChannels": ["SciShow Kids", "Art for Kids Hub"],
"allowedVideos": []What it does:
- only shows approved content
- can approve by topic, by channel, by exact video, or all three
- works well for younger kids
This is the extra behavior you asked for to discourage constant video-hopping.
The config block is:
"videoSwitchingControl": {
"enabled": true,
"mode": "confirm",
"maxSwitchesInWindow": 2,
"windowSeconds": 180,
"cooldownSeconds": 25,
"title": "Take a breath before the next video",
"message": "This parent setting adds a calm pause when videos are switched too quickly.",
"buttonText": "Open the next video"
}What the settings mean:
enabled: turns the feature on or offmode: "cooldown": after the pause, the video opens automaticallymode: "confirm": after the pause, the child must tap a button to continuemaxSwitchesInWindow: how many quick switches are allowed before the pause startswindowSeconds: how far back the app looks when counting switchescooldownSeconds: how long the pause laststitle,message,buttonText: the text shown during the pause screen
Practical advice:
- use
cooldownif you want something gentle - use
confirmif you want rapid switching to feel more annoying and less rewarding - start with a short pause like 15 or 20 seconds
The watch page can also guide what happens after a video starts or ends.
"watchSuggestions": [
"https://www.youtube.com/watch?v=VIDEO_ID_1",
"https://www.youtube.com/watch?v=VIDEO_ID_2"
],
"watchExperience": {
"blockUnexpectedVideoChanges": true,
"revealSuggestionsAfterSeconds": 5,
"autoPlayNextSuggestion": true,
"autoPlayNextSuggestionSeconds": 10
}What these settings do:
watchSuggestions: approved videos shown below the player as safe next choicesblockUnexpectedVideoChanges: if the YouTube player switches to a different video, Safe YouTube stops it and shows its own overlay againrevealSuggestionsAfterSeconds: how long a child needs to watch before the safe suggestions appear below the videoautoPlayNextSuggestion: after a video ends, automatically start the first approved next videoautoPlayNextSuggestionSeconds: how long the countdown lasts before the approved next video starts
Inside safe-youtube.config.jsonc:
siteTitle: the app namesiteDescription: short browser and home-screen descriptionwelcomeMessage: text shown on the home pagesimpleSettings: the easiest top-of-file yes/no switchessimpleSettings.allowSearching:1shows the search box,0hides itsimpleSettings.allowOnlyApprovedChannels:1means only channels inallowedChannelsare allowedsimpleSettings.allowOnlyApprovedVideos:1means only exact links inallowedVideosare allowedsimpleSettings.slowDownFastSwitching:1turns on the rapid-switch pausemode:"blocklist"or"allowlist"categories: big topic buttons on the home page. Each one has alabeland asearchForphrase.featuredVideos: full YouTube links shown on the home pagefeaturedChannels: trusted channels shown on the home pagewatchSuggestions: approved next videos shown below the playerblockedWords: hide results whose title, description, or channel matches these termsblockedChannels: hide results from these channelsblockedVideos: hide exact videos by link or video IDallowedSearchTerms: in allowlist mode, only searches matching these terms are allowedallowedChannels: in allowlist mode, only videos from these channels are allowedallowedVideos: in allowlist mode, only these exact videos are allowedwatchExperience: controls the end overlay, safe follow-up suggestions, and countdown behaviorvideoSwitchingControl: slows rapid switching between videostheme.accentColor: main button colortheme.accentTint: softer accent color
Use:
sample-configs/01-parent-starter-blocklist.jsonc
This is good if you want:
- a normal search box
- some obvious junk blocked
- a few trusted channels featured
Use:
sample-configs/02-approved-channels-only.jsonc
This is good if you want:
- only trusted channels
- topic approval
- a mild rapid-switch pause
Use:
sample-configs/03-slower-switching.jsonc
This is good if you want:
- calmer search terms
- stricter switching friction
- a gentler feel overall
Use:
sample-configs/04-exact-videos-only.jsonc
This is good if you want:
- no open browsing
- only a small list of exact videos
- the tightest setup
When you want to change the app later:
- Open your fork on GitHub
- Edit
safe-youtube.config.jsonc - Save the change
- Wait for Vercel to redeploy
That is the normal maintenance flow.
If you want to run it on your own computer:
npm install
npm run devThen open http://localhost:3000
To test a production build:
npm run build
npm start- the app reads its rules from
safe-youtube.config.jsonc - search results are filtered before they are shown
- the watch page also respects the rules, so direct video links are still checked
- the watch page can show a Safe YouTube end overlay, approved follow-up videos, and an optional auto-play countdown for the next approved suggestion
- the rapid-switch guard runs in the browser so it can react to how quickly a child opens new videos
- the app includes a manifest and service worker so it can be added to an iPad home screen
- ad-free playback depends on YouTube and YouTube Premium, not on this app itself
- the
/jsonc-checkerpage can validate pasted config text and provide a cleaned copy
If you want the smallest possible first change, edit just these fields:
"siteTitle": "Maya's Safe YouTube",
"simpleSettings": {
"allowSearching": 1,
"allowOnlyApprovedChannels": 0,
"allowOnlyApprovedVideos": 0,
"slowDownFastSwitching": 1
},
"categories": [
{ "label": "π Animals", "searchFor": "animals for kids" },
{ "label": "π¨ Drawing", "searchFor": "drawing for kids" },
{ "label": "π Space", "searchFor": "space for kids" }
],
"mode": "blocklist",
"blockedWords": ["horror", "violence", "prank"],
"videoSwitchingControl": {
"enabled": true,
"mode": "cooldown",
"maxSwitchesInWindow": 3,
"windowSeconds": 180,
"cooldownSeconds": 15,
"title": "Pause before the next video",
"message": "Fast switching can make YouTube harder to stop. Take a short pause before opening another video.",
"buttonText": "Continue to the video"
}That is enough to get a useful first version online.