diff --git a/src/wp-includes/class-wp-oembed.php b/src/wp-includes/class-wp-oembed.php
index ce75a4f196..acf2f5852f 100644
--- a/src/wp-includes/class-wp-oembed.php
+++ b/src/wp-includes/class-wp-oembed.php
@@ -50,9 +50,9 @@ class WP_oEmbed {
 	public function __construct() {
 		$host      = urlencode( home_url() );
 		$providers = array(
-			'#https?://((m|www)\.)?youtube\.com/watch.*#i' => array( 'https://www.youtube.com/oembed', true ),
-			'#https?://((m|www)\.)?youtube\.com/playlist.*#i' => array( 'https://www.youtube.com/oembed', true ),
-			'#https?://((m|www)\.)?youtube\.com/shorts/*#i' => array( 'https://www.youtube.com/oembed', true ),
+			'#https?://((m|www)\.)?youtube(?:-nocookie)?\.com/watch.*#i' => array( 'https://www.youtube.com/oembed', true ),
+			'#https?://((m|www)\.)?youtube(?:-nocookie)?\.com/playlist.*#i' => array( 'https://www.youtube.com/oembed', true ),
+			'#https?://((m|www)\.)?youtube(?:-nocookie)?\.com/shorts/*#i' => array( 'https://www.youtube.com/oembed', true ),
 			'#https?://youtu\.be/.*#i'                     => array( 'https://www.youtube.com/oembed', true ),
 			'#https?://(.+\.)?vimeo\.com/.*#i'             => array( 'https://vimeo.com/api/oembed.{format}', true ),
 			'#https?://(www\.)?dailymotion\.com/.*#i'      => array( 'https://www.dailymotion.com/services/oembed', true ),
@@ -359,6 +359,16 @@ class WP_oEmbed {
 			return false;
 		}
 
+		// If the input was a youtube-nocookie.com URL, modify the embed
+		// to use youtube-nocookie.com.
+		if ( $provider === 'https://www.youtube.com/oembed' && str_contains( $url, 'youtube-nocookie.com/' ) ) {
+			$data->html = str_replace( 'https://www.youtube.com/embed/', 'https://www.youtube-nocookie.com/embed/', $data->html );
+			// Remove "feature=oembed" parameter, since the iframe's code
+			// is no longer identical to YouTube's oembed output.
+			$data->html = str_replace( '?feature=oembed', '', $data->html );
+			$data->html = str_replace( '&feature=oembed', '', $data->html );
+		}
+
 		return $data;
 	}
 
diff --git a/src/wp-includes/embed.php b/src/wp-includes/embed.php
index 443d399217..20543eb995 100644
--- a/src/wp-includes/embed.php
+++ b/src/wp-includes/embed.php
@@ -202,7 +202,7 @@ function wp_maybe_load_embeds() {
 		return;
 	}
 
-	wp_embed_register_handler( 'youtube_embed_url', '#https?://(www.)?youtube\.com/(?:v|embed)/([^/]+)#i', 'wp_embed_handler_youtube' );
+	wp_embed_register_handler( 'youtube_embed_url', '#https?://(www.)?youtube(?:-nocookie)?\.com/(?:v|embed)/([^/]+)#i', 'wp_embed_handler_youtube' );
 
 	/**
 	 * Filters the audio embed handler callback.
@@ -241,7 +241,11 @@ function wp_maybe_load_embeds() {
  */
 function wp_embed_handler_youtube( $matches, $attr, $url, $rawattr ) {
 	global $wp_embed;
-	$embed = $wp_embed->autoembed( sprintf( 'https://youtube.com/watch?v=%s', urlencode( $matches[2] ) ) );
+	if ( str_contains( $url, 'youtube-nocookie.com/' ) ) {
+		$embed = $wp_embed->autoembed( sprintf( 'https://youtube-nocookie.com/watch?v=%s', urlencode( $matches[2] ) ) );
+	} else {
+		$embed = $wp_embed->autoembed( sprintf( 'https://youtube.com/watch?v=%s', urlencode( $matches[2] ) ) );
+	}
 
 	/**
 	 * Filters the YoutTube embed output.
