Based on a single side, one can easily draw jigsaw pieces. In the following example, the macro \piece can be used to draw a piece of the desired shape. For all four sides it can be controlled if the nose should face outward (-1) or inward (1) or a straight line (0).
\documentclass{standalone}
\usepackage{tikz}
\newcommand{\side}[1]{
(0.0,#1*0.00) .. controls (0.0,#1*0.00) and (0.4,#1*-0.04) ..
(0.4,#1*0.04) .. controls (0.4,#1*0.11) and (0.2,#1*0.26) ..
(0.5,#1*0.26) .. controls (0.8,#1*0.26) and (0.6,#1*0.11) ..
(0.6,#1*0.04) .. controls (0.6,#1*-0.04) and (1.0,#1*0.00) ..
(1.0,#1*0.00)
}
\newcommand{\piece}[4]{
\draw
\side{#1}
[rotate around={90:(0.5,0.5)}] \side{#2}
[rotate around={180:(0.5,0.5)}] \side{#3}
[rotate around={270:(0.5,0.5)}] \side{#4};
}
\begin{document}
\begin{tikzpicture}[scale=3]
\piece{1}{1}{1}{1}
\end{tikzpicture}
\begin{tikzpicture}[scale=3]
\piece{1}{-1}{1}{1}
\end{tikzpicture}
\begin{tikzpicture}[scale=3]
\piece{1}{-1}{-1}{1}
\end{tikzpicture}
\begin{tikzpicture}[scale=3]
\piece{1}{-1}{-1}{-1}
\end{tikzpicture}
\begin{tikzpicture}[scale=3]
\piece{-1}{-1}{-1}{-1}
\end{tikzpicture}
\begin{tikzpicture}[scale=3]
\piece{-1}{1}{-1}{1}
\end{tikzpicture}
\end{document}

These pieces can also be used to build a puzzle:
\documentclass{standalone}
\usepackage{tikz}
\newcommand{\side}[1]{
(0.5,0.5) --
(0.0,#1*0.00) .. controls (0.0,#1*0.00) and (0.4,#1*-0.04) ..
(0.4,#1*0.04) .. controls (0.4,#1*0.11) and (0.2,#1*0.26) ..
(0.5,#1*0.26) .. controls (0.8,#1*0.26) and (0.6,#1*0.11) ..
(0.6,#1*0.04) .. controls (0.6,#1*-0.04) and (1.0,#1*0.00) ..
(1.0,#1*0.00)
}
\newcommand{\piece}[5][white]{
\fill[#1]
\side{#2}
[rotate around={90:(0.5,0.5)}] \side{#3}
[rotate around={180:(0.5,0.5)}] \side{#4}
[rotate around={270:(0.5,0.5)}] \side{#5}
-- cycle;
}
\begin{document}
\begin{tikzpicture}
\begin{scope}
\piece[red]{1}{1}{0}{0}
\end{scope}
\begin{scope}[xshift=1cm]
\piece[blue]{1}{-1}{-1}{0}
\end{scope}
\begin{scope}[xshift=2cm]
\piece[green]{1}{0}{1}{0}
\end{scope}
\begin{scope}[yshift=-1cm]
\piece[green]{1}{-1}{0}{-1}
\end{scope}
\begin{scope}[xshift=1cm,yshift=-1cm]
\piece[red]{1}{-1}{1}{-1}
\end{scope}
\begin{scope}[xshift=2cm,yshift=-1cm]
\piece[blue]{-1}{0}{1}{-1}
\end{scope}
\begin{scope}[yshift=-2cm]
\piece[blue]{0}{-1}{0}{-1}
\end{scope}
\begin{scope}[xshift=1cm,yshift=-2cm]
\piece[green]{0}{-1}{1}{-1}
\end{scope}
\begin{scope}[xshift=2cm,yshift=-2cm]
\piece[red]{0}{0}{1}{1}
\end{scope}
\end{tikzpicture}
\end{document}

Or to produce a random puzzle:
\documentclass{standalone}
\usepackage{tikz}
\pgfmathparse{int(random(1,120))}
\newcommand{\side}[1]{
(0.0,#1*0.00) .. controls (0.0,#1*0.00) and (0.4,#1*-0.04) ..
(0.4,#1*0.04) .. controls (0.4,#1*0.11) and (0.2,#1*0.26) ..
(0.5,#1*0.26) .. controls (0.8,#1*0.26) and (0.6,#1*0.11) ..
(0.6,#1*0.04) .. controls (0.6,#1*-0.04) and (1.0,#1*0.00) ..
(1.0,#1*0.00)
}
\newcommand{\piece}[2]{
\draw[ultra thick] \side{#1} [rotate around={90:(0.5,0.5)}] \side{#2};
}
\pgfmathdeclarerandomlist{inout}{{-1}{1}}
\begin{document}
\begin{tikzpicture}[scale=5]
\def\xmax{10}
\def\ymax{10}
\foreach \x in {0,...,\xmax}{
\foreach \y in {0,...,\ymax}{
\ifnum\y=0
\def\bottom{0}
\else
\pgfmathrandomitem{\bottom}{inout}%
\fi
\ifnum\x=\xmax
\def\right{0}
\else
\pgfmathrandomitem{\right}{inout}%
\fi
\begin{scope}[xshift=\x cm, yshift=\y cm]
\piece{\bottom}{\right}
\end{scope}
}
}
\draw (0,0) -- (0,\ymax+1) -- (\xmax+1,\ymax+1);
\end{tikzpicture}
\end{document}

With background image
\documentclass{standalone}
\usepackage{tikz}
\pgfmathparse{int(random(1,120))}
\newcommand{\side}[1]{
(0.0,#1*0.00) .. controls (0.0,#1*0.00) and (0.4,#1*-0.04) ..
(0.4,#1*0.04) .. controls (0.4,#1*0.11) and (0.2,#1*0.26) ..
(0.5,#1*0.26) .. controls (0.8,#1*0.26) and (0.6,#1*0.11) ..
(0.6,#1*0.04) .. controls (0.6,#1*-0.04) and (1.0,#1*0.00) ..
(1.0,#1*0.00)
}
\newcommand{\piece}[2]{
\draw[thick] \side{#1} [rotate around={90:(0.5,0.5)}] \side{#2};
}
\pgfmathdeclarerandomlist{inout}{{-1}{1}}
\begin{document}
\begin{tikzpicture}
\node at (5.5,4) {\includegraphics[width=11cm,height=8cm]{example-image-duck}};
\def\xmax{10}
\def\ymax{7}
\foreach \x in {0,...,\xmax}{
\foreach \y in {0,...,\ymax}{
\ifnum\y=0
\def\bottom{0}
\else
\pgfmathrandomitem{\bottom}{inout}%
\fi
\ifnum\x=\xmax
\def\right{0}
\else
\pgfmathrandomitem{\right}{inout}%
\fi
\begin{scope}[xshift=\x cm, yshift=\y cm]
\piece{\bottom}{\right}
\end{scope}
}
}
\draw (0,0) -- (0,\ymax+1) -- (\xmax+1,\ymax+1);
\end{tikzpicture}
\end{document}

inandout. Weird. ;-) ;-) – Aug 16 '18 at 17:16